fixed masking condition for ML training data for genes and wrote revised mask files out

This commit is contained in:
Tanushree Tunstall 2022-07-27 13:36:16 +01:00
parent 0adf69f75a
commit f4cab1fdfb
3 changed files with 46 additions and 26 deletions

View file

@ -77,6 +77,7 @@ import re
import itertools
from sklearn.model_selection import LeaveOneGroupOut
from sklearn.decomposition import PCA
from sklearn.naive_bayes import ComplementNB
#%% GLOBALS
#rs = {'random_state': 42}
@ -260,6 +261,8 @@ def MultModelsCl(input_df, target
#======================================================
models = [('AdaBoost Classifier' , AdaBoostClassifier(**rs) )
, ('Bagging Classifier' , BaggingClassifier(**rs, **njobs, bootstrap = True, oob_score = True, verbose = 3, n_estimators = 100) )
#, ('Bernoulli NB' , BernoulliNB() ) # pks Naive Bayes, CAUTION
, ('Complement NB' , ComplementNB() )
, ('Decision Tree' , DecisionTreeClassifier(**rs) )
, ('Extra Tree' , ExtraTreeClassifier(**rs) )
, ('Extra Trees' , ExtraTreesClassifier(**rs) )
@ -271,8 +274,8 @@ def MultModelsCl(input_df, target
, ('Logistic Regression' , LogisticRegression(**rs) )
, ('Logistic RegressionCV' , LogisticRegressionCV(cv = 3, **rs))
, ('MLP' , MLPClassifier(max_iter = 500, **rs) )
, ('Multinomial' , MultinomialNB() )
, ('Naive Bayes' , BernoulliNB() )
, ('Multinomial NB' , MultinomialNB() )
, ('Passive Aggresive' , PassiveAggressiveClassifier(**rs, **njobs) )
, ('QDA' , QuadraticDiscriminantAnalysis() )
, ('Random Forest' , RandomForestClassifier(**rs, n_estimators = 1000, **njobs ) )