Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ACLED support and use "yaml" file type for model settings #199

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add KFold to GridSearchCV
JannisHoch committed Aug 24, 2024
commit 8219d766b08e0649dc38df3993aa12208ff5493a
4 changes: 2 additions & 2 deletions copro/machine_learning.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
from typing import Union, Tuple
import click
from pathlib import Path
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import GridSearchCV, KFold
from sklearn.ensemble import RandomForestClassifier


@@ -304,7 +304,7 @@ def apply_gridsearchCV(
grid_search = GridSearchCV(
estimator=estimator,
param_grid=param_grid,
cv=5,
cv=KFold(n_splits=5, shuffle=True, random_state=42),
n_jobs=n_jobs,
verbose=verbose,
scoring="roc_auc",