File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
Script output:
13
13
14
14
Score with the entire dataset = 0.56
15
- Score without the samples containing missing values = 0.48
16
- Score after imputation of the missing values = 0.55
15
+ Score without the samples containing missing values = 0.49
16
+ Score after imputation of the missing values = 0.57
17
17
18
18
"""
19
19
import numpy as np
48
48
49
49
# Estimate the score without the lines containing missing values
50
50
X_filtered = X_full [~ missing_samples , :]
51
- y_filtered = y_full [~ missing_samples , : ]
51
+ y_filtered = y_full [~ missing_samples ]
52
52
estimator = RandomForestRegressor (random_state = 0 , n_estimators = 100 )
53
53
score = cross_val_score (estimator , X_filtered , y_filtered ).mean ()
54
54
print ("Score without the samples containing missing values = %.2f" % score )
You can’t perform that action at this time.
0 commit comments