diff --git a/uq_ml_models_FS/fs_UQ_ABC.py b/uq_ml_models_FS/fs_UQ_ABC.py index c91f0e2..eca18e8 100644 --- a/uq_ml_models_FS/fs_UQ_ABC.py +++ b/uq_ml_models_FS/fs_UQ_ABC.py @@ -7,10 +7,10 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [AdaBoostClassifier(**rs)] - , 'clf__estimator__n_estimators': [1, 2, 5, 10] - #, 'clf__estimator__base_estimator' : ['SVC'] - #, 'clf__estimator___splitter' : ["best", "random"] + 'clf': [AdaBoostClassifier(**rs)] + , 'clf__n_estimators': [1, 2, 5, 10] + #, 'clf__base_estimator' : ['SVC'] + #, 'clf__splitter' : ["best", "random"] } ] diff --git a/uq_ml_models_FS/fs_UQ_BC.py b/uq_ml_models_FS/fs_UQ_BC.py index c6273cd..320bd85 100644 --- a/uq_ml_models_FS/fs_UQ_BC.py +++ b/uq_ml_models_FS/fs_UQ_BC.py @@ -7,13 +7,13 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [BaggingClassifier(**rs + 'clf': [BaggingClassifier(**rs , **njobs , bootstrap = True , oob_score = True)] - , 'clf__estimator__n_estimators' : [10, 25, 50, 100, 150, 200, 500, 700, 1000] + , 'clf__n_estimators' : [10, 25, 50, 100, 150, 200, 500, 700, 1000] # If None, then the base estimator is a DecisionTreeClassifier. - #, 'clf__estimator__base_estimator' : ['None', 'SVC()', 'KNeighborsClassifier()']# if none, DT is used + #, 'clf__base_estimator' : ['None', 'SVC()', 'KNeighborsClassifier()']# if none, DT is used } ] diff --git a/uq_ml_models_FS/fs_UQ_BNB.py b/uq_ml_models_FS/fs_UQ_BNB.py index 8193431..ddc662f 100644 --- a/uq_ml_models_FS/fs_UQ_BNB.py +++ b/uq_ml_models_FS/fs_UQ_BNB.py @@ -7,11 +7,11 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [BernoulliNB()] - , 'clf__estimator__alpha': [1, 0] - , 'clf__estimator__binarize':[None, 0] - , 'clf__estimator__fit_prior': [True] - , 'clf__estimator__class_prior': [None] + 'clf': [BernoulliNB()] + , 'clf__alpha': [1, 0] + , 'clf__binarize':[None, 0] + , 'clf__fit_prior': [True] + , 'clf__class_prior': [None] } ] diff --git a/uq_ml_models_FS/fs_UQ_DT.py b/uq_ml_models_FS/fs_UQ_DT.py index b62043a..87ac26d 100644 --- a/uq_ml_models_FS/fs_UQ_DT.py +++ b/uq_ml_models_FS/fs_UQ_DT.py @@ -7,13 +7,13 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [DecisionTreeClassifier(**rs)] - , 'clf__estimator__max_depth': [None, 2, 4, 6, 8, 10, 12, 16, 20] - , 'clf__estimator__class_weight':['balanced'] - , 'clf__estimator__criterion': ['gini', 'entropy', 'log_loss'] - , 'clf__estimator__max_features': [None, 'sqrt', 'log2'] - , 'clf__estimator__min_samples_leaf': [1, 2, 3, 4, 5, 10] - , 'clf__estimator__min_samples_split': [2, 5, 15, 20] + 'clf': [DecisionTreeClassifier(**rs)] + , 'clf__max_depth': [None, 2, 4, 6, 8, 10, 12, 16, 20] + , 'clf__class_weight':['balanced'] + , 'clf__criterion': ['gini', 'entropy', 'log_loss'] + , 'clf__max_features': [None, 'sqrt', 'log2'] + , 'clf__min_samples_leaf': [1, 2, 3, 4, 5, 10] + , 'clf__min_samples_split': [2, 5, 15, 20] } ] diff --git a/uq_ml_models_FS/fs_UQ_GBC.py b/uq_ml_models_FS/fs_UQ_GBC.py index eca536a..ad47b54 100644 --- a/uq_ml_models_FS/fs_UQ_GBC.py +++ b/uq_ml_models_FS/fs_UQ_GBC.py @@ -7,12 +7,12 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [GradientBoostingClassifier(**rs)] - , 'clf__estimator__n_estimators' : [10, 100, 200, 500, 1000] - , 'clf__estimator__n_estimators' : [10, 100, 1000] - , 'clf__estimator__learning_rate': [0.001, 0.01, 0.1] - , 'clf__estimator__subsample' : [0.5, 0.7, 1.0] - , 'clf__estimator__max_depth' : [3, 7, 9] + 'clf': [GradientBoostingClassifier(**rs)] + , 'clf__n_estimators' : [10, 100, 200, 500, 1000] + , 'clf__n_estimators' : [10, 100, 1000] + , 'clf__learning_rate': [0.001, 0.01, 0.1] + , 'clf__subsample' : [0.5, 0.7, 1.0] + , 'clf__max_depth' : [3, 7, 9] } ] diff --git a/uq_ml_models_FS/fs_UQ_GNB.py b/uq_ml_models_FS/fs_UQ_GNB.py index cfcca4b..4652e26 100644 --- a/uq_ml_models_FS/fs_UQ_GNB.py +++ b/uq_ml_models_FS/fs_UQ_GNB.py @@ -7,9 +7,9 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [GaussianNB()] - , 'clf__estimator__priors': [None] - , 'clf__estimator__var_smoothing': np.logspace(0,-9, num=100) + 'clf': [GaussianNB()] + , 'clf__priors': [None] + , 'clf__var_smoothing': np.logspace(0,-9, num=100) } ] diff --git a/uq_ml_models_FS/fs_UQ_GPC.py b/uq_ml_models_FS/fs_UQ_GPC.py index dd425d0..5a9e535 100644 --- a/uq_ml_models_FS/fs_UQ_GPC.py +++ b/uq_ml_models_FS/fs_UQ_GPC.py @@ -7,9 +7,9 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [GaussianProcessClassifier(**rs)] + 'clf': [GaussianProcessClassifier(**rs)] - , 'clf__estimator__kernel': [1*RBF(), 1*DotProduct(), 1*Matern(), 1*RationalQuadratic(), 1*WhiteKernel()] + , 'clf__kernel': [1*RBF(), 1*DotProduct(), 1*Matern(), 1*RationalQuadratic(), 1*WhiteKernel()] } ] diff --git a/uq_ml_models_FS/fs_UQ_KNN.py b/uq_ml_models_FS/fs_UQ_KNN.py index 1145dcf..21b6678 100644 --- a/uq_ml_models_FS/fs_UQ_KNN.py +++ b/uq_ml_models_FS/fs_UQ_KNN.py @@ -7,11 +7,11 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [KNeighborsClassifier(**njobs)] - , 'clf__estimator__n_neighbors': range(21, 51, 2) - #, 'clf__estimator__n_neighbors': [5, 7, 11] - , 'clf__estimator__metric' : ['euclidean', 'manhattan', 'minkowski'] - , 'clf__estimator__weights' : ['uniform', 'distance'] + 'clf': [KNeighborsClassifier(**njobs)] + , 'clf__n_neighbors': range(21, 51, 2) + #, 'clf__n_neighbors': [5, 7, 11] + , 'clf__metric' : ['euclidean', 'manhattan', 'minkowski'] + , 'clf__weights' : ['uniform', 'distance'] } ] diff --git a/uq_ml_models_FS/fs_UQ_LR.py b/uq_ml_models_FS/fs_UQ_LR.py index 8691d4b..afff701 100644 --- a/uq_ml_models_FS/fs_UQ_LR.py +++ b/uq_ml_models_FS/fs_UQ_LR.py @@ -14,28 +14,28 @@ Created on Tue Mar 15 11:09:50 2022 """ parameters = [ { - 'clf__estimator': [LogisticRegression(**rs)], - #'clf__estimator__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], - 'clf__estimator__C': np.logspace(0, 4, 10), - 'clf__estimator__penalty': ['none', 'l1', 'l2', 'elasticnet'], - 'clf__estimator__max_iter': list(range(100,800,100)), - 'clf__estimator__solver': ['saga'] + 'clf': [LogisticRegression(**rs)], + #'clf__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], + 'clf__C': np.logspace(0, 4, 10), + 'clf__penalty': ['none', 'l1', 'l2', 'elasticnet'], + 'clf__max_iter': list(range(100,800,100)), + 'clf__solver': ['saga'] }, { - 'clf__estimator': [LogisticRegression(**rs)], - #'clf__estimator__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], - 'clf__estimator__C': np.logspace(0, 4, 10), - 'clf__estimator__penalty': ['l2', 'none'], - 'clf__estimator__max_iter': list(range(100,800,100)), - 'clf__estimator__solver': ['newton-cg', 'lbfgs', 'sag'] + 'clf': [LogisticRegression(**rs)], + #'clf__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], + 'clf__C': np.logspace(0, 4, 10), + 'clf__penalty': ['l2', 'none'], + 'clf__max_iter': list(range(100,800,100)), + 'clf__solver': ['newton-cg', 'lbfgs', 'sag'] }, { - 'clf__estimator': [LogisticRegression(**rs)], - #'clf__estimator__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], - 'clf__estimator__C': np.logspace(0, 4, 10), - 'clf__estimator__penalty': ['l1', 'l2'], - 'clf__estimator__max_iter': list(range(100,800,100)), - 'clf__estimator__solver': ['liblinear'] + 'clf': [LogisticRegression(**rs)], + #'clf__C': [0.001, 0.01, 0.1, 1, 10, 100, 1000], + 'clf__C': np.logspace(0, 4, 10), + 'clf__penalty': ['l1', 'l2'], + 'clf__max_iter': list(range(100,800,100)), + 'clf__solver': ['liblinear'] } ] diff --git a/uq_ml_models_FS/fs_UQ_MLP.py b/uq_ml_models_FS/fs_UQ_MLP.py index 9695f35..c9ff143 100644 --- a/uq_ml_models_FS/fs_UQ_MLP.py +++ b/uq_ml_models_FS/fs_UQ_MLP.py @@ -7,12 +7,12 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [MLPClassifier(**rs + 'clf': [MLPClassifier(**rs , max_iter = 1000)] - , 'clf__estimator__hidden_layer_sizes': [(1), (2), (3), (5), (10)] - , 'clf__estimator__solver': ['lbfgs', 'sgd', 'adam'] - , 'clf__estimator__learning_rate': ['constant', 'invscaling', 'adaptive'] - #, 'clf__estimator__learning_rate': ['constant'] + , 'clf__hidden_layer_sizes': [(1), (2), (3), (5), (10)] + , 'clf__solver': ['lbfgs', 'sgd', 'adam'] + , 'clf__learning_rate': ['constant', 'invscaling', 'adaptive'] + #, 'clf__learning_rate': ['constant'] } ] diff --git a/uq_ml_models_FS/fs_UQ_QDA.py b/uq_ml_models_FS/fs_UQ_QDA.py index c34b862..b882a00 100644 --- a/uq_ml_models_FS/fs_UQ_QDA.py +++ b/uq_ml_models_FS/fs_UQ_QDA.py @@ -7,7 +7,7 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [QuadraticDiscriminantAnalysis()] + 'clf': [QuadraticDiscriminantAnalysis()] } ] diff --git a/uq_ml_models_FS/fs_UQ_RC.py b/uq_ml_models_FS/fs_UQ_RC.py index f2a21de..c03d178 100644 --- a/uq_ml_models_FS/fs_UQ_RC.py +++ b/uq_ml_models_FS/fs_UQ_RC.py @@ -6,8 +6,8 @@ Created on Wed May 18 06:03:24 2022 @author: tanu """ parameters = [ - {'clf__estimator' : [RidgeClassifier(**rs)] - , 'clf__estimator__alpha': [0.1, 0.2, 0.5, 0.8, 1.0] + {'clf' : [RidgeClassifier(**rs)] + , 'clf__alpha': [0.1, 0.2, 0.5, 0.8, 1.0] } ] diff --git a/uq_ml_models_FS/fs_UQ_RF.py b/uq_ml_models_FS/fs_UQ_RF.py index f87b87d..01d7fd6 100644 --- a/uq_ml_models_FS/fs_UQ_RF.py +++ b/uq_ml_models_FS/fs_UQ_RF.py @@ -7,17 +7,17 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [RandomForestClassifier(**rs + 'clf': [RandomForestClassifier(**rs , **njobs , bootstrap = True , oob_score = True)], - 'clf__estimator__max_depth': [4, 6, 8, 10, 12, 16, 20, None] - , 'clf__estimator__class_weight':['balanced','balanced_subsample'] - , 'clf__estimator__n_estimators': [10, 25, 50, 100] - , 'clf__estimator__criterion': ['gini', 'entropy', 'log_loss'] - , 'clf__estimator__max_features': ['sqrt', 'log2', None] #deafult is sqrt - , 'clf__estimator__min_samples_leaf': [1, 2, 3, 4, 5, 10] - , 'clf__estimator__min_samples_split': [2, 5, 15, 20] + 'clf__max_depth': [4, 6, 8, 10, 12, 16, 20, None] + , 'clf__class_weight':['balanced','balanced_subsample'] + , 'clf__n_estimators': [10, 25, 50, 100] + , 'clf__criterion': ['gini', 'entropy', 'log_loss'] + , 'clf__max_features': ['sqrt', 'log2', None] #deafult is sqrt + , 'clf__min_samples_leaf': [1, 2, 3, 4, 5, 10] + , 'clf__min_samples_split': [2, 5, 15, 20] } ] diff --git a/uq_ml_models_FS/fs_UQ_SVC.py b/uq_ml_models_FS/fs_UQ_SVC.py index 336746d..d7ac215 100644 --- a/uq_ml_models_FS/fs_UQ_SVC.py +++ b/uq_ml_models_FS/fs_UQ_SVC.py @@ -7,12 +7,12 @@ Created on Wed May 18 06:03:24 2022 """ parameters = [ { - 'clf__estimator': [SVC(**rs)] - , 'clf__estimator__kernel': ['poly', 'rbf', 'sigmoid'] - #, 'clf__estimator__kernel': ['linear'] + 'clf': [SVC(**rs)] + , 'clf__kernel': ['poly', 'rbf', 'sigmoid'] + #, 'clf__kernel': ['linear'] - , 'clf__estimator__C' : [50, 10, 1.0, 0.1, 0.01] - , 'clf__estimator__gamma': ['scale', 'auto'] + , 'clf__C' : [50, 10, 1.0, 0.1, 0.01] + , 'clf__gamma': ['scale', 'auto'] } ] diff --git a/uq_ml_models_FS/fs_UQ_XGB.py b/uq_ml_models_FS/fs_UQ_XGB.py index 576613d..e2d2cc5 100644 --- a/uq_ml_models_FS/fs_UQ_XGB.py +++ b/uq_ml_models_FS/fs_UQ_XGB.py @@ -18,11 +18,11 @@ Created on Wed May 18 06:03:24 2022 parameters = [ { - 'clf__estimator': [XGBClassifier(**rs , **njobs, verbose = 3)] - , 'clf__estimator__learning_rate': [0.01, 0.05, 0.1, 0.2] - , 'clf__estimator__max_depth': [4, 6, 8, 10, 12, 16, 20] - #, 'clf__estimator__min_samples_leaf': [4, 8, 12, 16, 20] - #, 'clf__estimator__max_features': ['auto', 'sqrt'] + 'clf': [XGBClassifier(**rs , **njobs, verbose = 3)] + , 'clf__learning_rate': [0.01, 0.05, 0.1, 0.2] + , 'clf__max_depth': [4, 6, 8, 10, 12, 16, 20] + #, 'clf__min_samples_leaf': [4, 8, 12, 16, 20] + #, 'clf__max_features': ['auto', 'sqrt'] } ]