|  | 
| 10 | 10 | from sklearn.decomposition import PCA | 
| 11 | 11 | from sklearn.preprocessing import StandardScaler | 
| 12 | 12 | from sklearn.model_selection import cross_val_predict | 
| 13 |  | -from sklearn.metrics import mean_squared_error, r2_score | 
|  | 13 | +from sklearn.metrics import root_mean_squared_error, r2_score | 
| 14 | 14 | import statsmodels.api as sm | 
| 15 | 15 | from statsmodels.formula.api import ols | 
| 16 | 16 | 
 | 
| @@ -450,15 +450,15 @@ def pcr_fit(self, cv_percentage=20, mode='exp_var', model='linear', | 
| 450 | 450 |                 self.y[curr_y], self.pcr_y_cv.loc[ | 
| 451 | 451 |                     idx[curr_y, :], n_components], multioutput='raw_values') | 
| 452 | 452 |             self.pcr_metrics.at[(curr_y, 'rmse_c'), n_components] = ( | 
| 453 |  | -                mean_squared_error(self.y[curr_y], | 
|  | 453 | +                root_mean_squared_error(self.y[curr_y], | 
| 454 | 454 |                                    self.pcr_y_c.loc[idx[curr_y, :], | 
| 455 | 455 |                                                     n_components], | 
| 456 |  | -                                   multioutput='raw_values', squared=False)) | 
|  | 456 | +                                   multioutput='raw_values')) | 
| 457 | 457 |             self.pcr_metrics.at[(curr_y, 'rmse_cv'), n_components] = ( | 
| 458 |  | -                mean_squared_error(self.y[curr_y], | 
|  | 458 | +                root_mean_squared_error(self.y[curr_y], | 
| 459 | 459 |                                    self.pcr_y_cv.loc[idx[curr_y, :], | 
| 460 | 460 |                                                      n_components], | 
| 461 |  | -                                   multioutput='raw_values', squared=False)) | 
|  | 461 | +                                   multioutput='raw_values')) | 
| 462 | 462 | 
 | 
| 463 | 463 |     def pcr_sweep(self, sweep_components=20, cv_percentage=20, mode='exp_var', | 
| 464 | 464 |                   model='linear', **kwargs): | 
|  | 
0 commit comments