added random state to split in function
This commit is contained in:
parent
e5f882841e
commit
53c229f480
3 changed files with 24 additions and 21 deletions
|
@ -215,7 +215,7 @@ def MultModelsCl(input_df, target, skf_cv
|
|||
, ('Naive Bayes' , BernoulliNB() )
|
||||
, ('Passive Aggresive' , PassiveAggressiveClassifier(**rs, **njobs) )
|
||||
, ('QDA' , QuadraticDiscriminantAnalysis() )
|
||||
, ('Random Forest' , RandomForestClassifier(**rs, n_estimators = 1000 ) )
|
||||
, ('Random Forest' , RandomForestClassifier(**rs, n_estimators = 1000, **njobs ) )
|
||||
, ('Random Forest2' , RandomForestClassifier(min_samples_leaf = 5
|
||||
, n_estimators = 1000
|
||||
, bootstrap = True
|
||||
|
|
|
@ -40,7 +40,7 @@ import argparse
|
|||
import re
|
||||
homedir = os.path.expanduser("~")
|
||||
#%% GLOBALS
|
||||
rs = {'random_state': 42}
|
||||
#rs = {'random_state': 42}
|
||||
njobs = {'n_jobs': os.cpu_count() } # the number of jobs should equal the number of CPU cores
|
||||
|
||||
#%% Define split_tts function #################################################
|
||||
|
@ -51,7 +51,10 @@ def split_tts(ml_input_data
|
|||
, dst_colname = 'dst'# determine how to subset the actual vs reverse data
|
||||
, target_colname = 'dst_mode'
|
||||
, include_gene_name = True
|
||||
, k_smote = 5):
|
||||
, k_smote = 5
|
||||
, random_state = 42):
|
||||
|
||||
rs = {'random_state': random_state}
|
||||
|
||||
outDict = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue