mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-08 02:18:51 -06:00
Reformat source code with Black; add pre-commit hooks and CI checks
This commit is contained in:
@@ -22,9 +22,11 @@ class AdaptiveClassifier(Classifier):
|
||||
based on its cross-validation score on a particular training data set.
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
candidates=None,
|
||||
evaluator=ClassifierEvaluator()):
|
||||
def __init__(
|
||||
self,
|
||||
candidates=None,
|
||||
evaluator=ClassifierEvaluator(),
|
||||
):
|
||||
"""
|
||||
Initializes the meta-classifier.
|
||||
"""
|
||||
@@ -35,14 +37,13 @@ class AdaptiveClassifier(Classifier):
|
||||
"min samples": 100,
|
||||
},
|
||||
"logistic": {
|
||||
"classifier": make_pipeline(StandardScaler(),
|
||||
LogisticRegression()),
|
||||
"classifier": make_pipeline(StandardScaler(), LogisticRegression()),
|
||||
"min samples": 30,
|
||||
},
|
||||
"counting": {
|
||||
"classifier": CountingClassifier(),
|
||||
"min samples": 0,
|
||||
}
|
||||
},
|
||||
}
|
||||
self.candidates = candidates
|
||||
self.evaluator = evaluator
|
||||
|
||||
Reference in New Issue
Block a user