remove __estimator

This commit is contained in:
Tanushree Tunstall 2022-05-22 23:39:35 +01:00
parent 1a1154b4f4
commit 9839b6f8d1
15 changed files with 79 additions and 79 deletions

View file

@ -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"]
}
]

View file

@ -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
}
]

View file

@ -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]
}
]

View file

@ -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]
}
]

View file

@ -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]
}
]

View file

@ -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)
}
]

View file

@ -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()]
}
]

View file

@ -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']
}
]

View file

@ -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']
}
]

View file

@ -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']
}
]

View file

@ -7,7 +7,7 @@ Created on Wed May 18 06:03:24 2022
"""
parameters = [
{
'clf__estimator': [QuadraticDiscriminantAnalysis()]
'clf': [QuadraticDiscriminantAnalysis()]
}
]

View file

@ -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]
}
]

View file

@ -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]
}
]

View file

@ -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']
}
]

View file

@ -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']
}
]