Skip to content
Snippets Groups Projects
Commit f0f9668e authored by Manoj Kumar's avatar Manoj Kumar Committed by Lars Buitinck
Browse files

FIX: Fix the imputation example

parent d3c16a60
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ missing_features = rng.randint(0, n_features, n_missing_samples) ...@@ -48,7 +48,7 @@ missing_features = rng.randint(0, n_features, n_missing_samples)
# Estimate the score without the lines containing missing values # Estimate the score without the lines containing missing values
X_filtered = X_full[~missing_samples, :] X_filtered = X_full[~missing_samples, :]
y_filtered = y_full[~missing_samples, :] y_filtered = y_full[~missing_samples]
estimator = RandomForestRegressor(random_state=0, n_estimators=100) estimator = RandomForestRegressor(random_state=0, n_estimators=100)
score = cross_val_score(estimator, X_filtered, y_filtered).mean() score = cross_val_score(estimator, X_filtered, y_filtered).mean()
print("Score without the samples containing missing values = %.2f" % score) print("Score without the samples containing missing values = %.2f" % score)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment