Skip to content

Boruta_model_pkl_final

Pre-release
Pre-release
Compare
Choose a tag to compare
@franckess franckess released this 05 Apr 04:58
· 7 commits to main since this release
# define random forest classifier
forest = RandomForestClassifier(n_jobs=-1, class_weight='balanced', max_depth = 3)
forest.fit(X, Y)

# define Boruta feature selection method
feat_selector = BorutaPy(forest, n_estimators='auto', verbose=0, random_state=1)

model_path = os.path.join("./output/", 'boruta_model_2.pkl')
joblib.dump(feat_selector, model_path)