saving work and wrapping up from the weekend

This commit is contained in:
Tanushree Tunstall 2022-05-23 00:31:02 +01:00
parent 9839b6f8d1
commit 1436557287
3 changed files with 12 additions and 13 deletions

View file

@ -73,22 +73,21 @@ parameters = [
# }
{'fs__min_features_to_select': [1,2]},
{'classifier': [LogisticRegression()],
#'classifier__C': np.logspace(0, 4, 10),
'classifier__C': [2, 2.8],
'classifier__max_iter': [100],
'classifier__penalty': ['l1', 'l2'],
'classifier__solver': ['saga']
{'clf': [LogisticRegression(**rs)],
#'clf__C': np.logspace(0, 4, 10),
'clf__C': [2, 2.8],
'clf__max_iter': [100],
'clf__penalty': ['l1', 'l2'],
'clf__solver': ['saga']
}
]
#%% Create pipeline
pipeline = Pipeline([
# ('pre', MinMaxScaler())
('fs', RFECV(LogisticRegression(**rs), scoring = 'matthews_corrcoef'))#cant be my mcc_fn
#, ('clf', ClfSwitcher())
, ('classifier', ClfSwitcher())
('pre', MinMaxScaler())
, ('fs', RFECV(LogisticRegression(**rs), scoring = 'matthews_corrcoef'))#cant be my mcc_fn
#, ('clf', ClfSwitcher()) # gives me slightly lower results
#, ('clf', LogisticRegression(**rs))
])
#%%