I am getting error using GridSearchCV #31963
-
|
I am just learning X_train, X_holdout, y_train, y_holdout = train_test_split(
df.values, y, test_size=0.3, random_state=17
)
tree = DecisionTreeClassifier(max_depth=5, random_state=17)
tree.fit(X_train, y_train)
tree_pred = tree.predict(X_holdout)
print(accuracy_score(y_holdout, tree_pred))
tree_params = {"max_depth": range(1, 11), "max_features":range(4, 19)}
tree_grid = GridSearchCV(tree, tree_params, cv=5, n_jobs=-1, verbose=True)
tree_grid.fit(X_train, y_train)I get bunch of value errors. It is basically lines and lines of this error with random id for the file. |
Beta Was this translation helpful? Give feedback.
Answered by
JollyForlics
Aug 19, 2025
Replies: 1 comment
-
|
Doing this solved the problem with joblib.parallel_backend("threading"):
tree_grid.fit(X_train, y_train) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JollyForlics
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doing this solved the problem