Skip to content

Commit 5cc520f

Browse files
Updated sklearn.metrics.mean_squared_error to sklearn.metrics.root_mean_squared_error
1 parent 0f7d908 commit 5cc520f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/pyDataFitting/principle_component_regression.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from sklearn.decomposition import PCA
1111
from sklearn.preprocessing import StandardScaler
1212
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
1414
import statsmodels.api as sm
1515
from statsmodels.formula.api import ols
1616

@@ -450,15 +450,15 @@ def pcr_fit(self, cv_percentage=20, mode='exp_var', model='linear',
450450
self.y[curr_y], self.pcr_y_cv.loc[
451451
idx[curr_y, :], n_components], multioutput='raw_values')
452452
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],
454454
self.pcr_y_c.loc[idx[curr_y, :],
455455
n_components],
456-
multioutput='raw_values', squared=False))
456+
multioutput='raw_values'))
457457
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],
459459
self.pcr_y_cv.loc[idx[curr_y, :],
460460
n_components],
461-
multioutput='raw_values', squared=False))
461+
multioutput='raw_values'))
462462

463463
def pcr_sweep(self, sweep_components=20, cv_percentage=20, mode='exp_var',
464464
model='linear', **kwargs):

0 commit comments

Comments
 (0)