'what is the difference between the mean_squared_error computed in both of these pieces of code? how can I compare metric='mse' to mean_squared_error?

rf_reg = RandomForestRegressor(
n_estimators=500, 
max_depth=30,                             
criterion="mse",                               
max_features=6,                              
n_jobs=-1,                             
random_state=1)

rf_reg.fit(x_train, y_train)

train_pred_y = rf_reg.predict(x_train)
test_pred_y = rf_reg.predict(x_test)

print(f"train_MSE = {mean_squared_error(y_train, train_pred_y)}")
print(f"test_MSE = {mean_squared_error(y_test, test_pred_y)}")

and

automl.fit(X_train, y_train, task="regression",metric='mse',time_budget=3600)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source