Skip to content

Commit

Permalink
EXA Fix iterative imputer example's speed issue. (#13379)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinjalali authored and qinhanmin2014 committed Mar 4, 2019
1 parent a3ccbe9 commit 813eb4c
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -57,6 +57,10 @@
rng = np.random.RandomState(0)

X_full, y_full = fetch_california_housing(return_X_y=True)
# ~2k samples is enough for the purpose of the example.
# Remove the following two lines for a slower run with different error bars.
X_full = X_full[::10]
y_full = y_full[::10]
n_samples, n_features = X_full.shape

# Estimate the score on the entire dataset, with no missing values
Expand Down Expand Up @@ -93,7 +97,7 @@
estimators = [
BayesianRidge(),
DecisionTreeRegressor(max_features='sqrt', random_state=0),
ExtraTreesRegressor(n_estimators=10, n_jobs=-1, random_state=0),
ExtraTreesRegressor(n_estimators=10, random_state=0),
KNeighborsRegressor(n_neighbors=15)
]
score_iterative_imputer = pd.DataFrame()
Expand Down

0 comments on commit 813eb4c

Please sign in to comment.