Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 9, 2024
1 parent 99cc2d6 commit 96ecd3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spikeinterface/curation/train_manual_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,14 @@ def _train_and_evaluate(self, imputation_strategy, scaler, classifier, X_train,
model, param_space = self.get_classifier_search_space(classifier.__class__.__name__)
try:
from skopt import BayesSearchCV

model = BayesSearchCV(
model, param_space, cv=3, scoring="balanced_accuracy", n_iter=25, random_state=self.seed, n_jobs=-1
)
except:
print("BayesSearchCV from scikit-optimize not available, using GridSearchCV")
from sklearn.model_selection import HalvingGridSearchCV

model = HalvingGridSearchCV(model, param_space, cv=3, scoring="balanced_accuracy", n_jobs=-1)

model.fit(X_train_scaled, y_train)
Expand Down

0 comments on commit 96ecd3f

Please sign in to comment.