Skip to content

Commit 5dbb478

Browse files
SebastienMeloSebastienMelo
authored andcommitted
FIX HistGradientBoosting fitting time too long (INRIA#860)
1 parent 8c057a2 commit 5dbb478

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

python_scripts/ensemble_hist_gradient_boosting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
data,
5959
target,
6060
scoring="neg_mean_absolute_error",
61-
n_jobs=2,
61+
# n_jobs=2, # Uncomment this line if you run locally
6262
)
6363

6464
# %%
@@ -122,7 +122,7 @@
122122
data,
123123
target,
124124
scoring="neg_mean_absolute_error",
125-
n_jobs=2,
125+
# n_jobs=2, # Uncomment this line if you run locally
126126
)
127127

128128
# %%
@@ -161,7 +161,7 @@
161161
data,
162162
target,
163163
scoring="neg_mean_absolute_error",
164-
n_jobs=2,
164+
# n_jobs=2, # Uncomment this line if you run locally
165165
)
166166

167167
# %%

python_scripts/ensemble_hyperparameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
scoring="neg_mean_absolute_error",
9797
n_iter=10,
9898
random_state=0,
99-
n_jobs=2,
99+
# n_jobs=2, # Uncomment this line if you run locally
100100
)
101101
search_cv.fit(data_train, target_train)
102102

@@ -184,7 +184,7 @@
184184
scoring="neg_mean_absolute_error",
185185
n_iter=20,
186186
random_state=0,
187-
n_jobs=2,
187+
# n_jobs=2, # Uncomment this line if you run locally
188188
)
189189
search_cv.fit(data_train, target_train)
190190

python_scripts/ensemble_sol_04.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070

7171
cv = KFold(n_splits=5, shuffle=True, random_state=0)
7272
results = cross_validate(
73-
search, data, target, cv=cv, return_estimator=True, n_jobs=2
73+
search,
74+
data,
75+
target,
76+
cv=cv,
77+
return_estimator=True,
78+
# n_jobs=2 # Uncomment this if you run locally
7479
)
7580

7681
# %% [markdown]

0 commit comments

Comments
 (0)