mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Make classifiers and regressors clonable
This commit is contained in:
@@ -15,7 +15,7 @@ def test_adaptive() -> None:
|
||||
clf = AdaptiveClassifier(
|
||||
candidates={
|
||||
"linear": CandidateClassifierSpecs(
|
||||
classifier=lambda: ScikitLearnClassifier(
|
||||
classifier=ScikitLearnClassifier(
|
||||
SVC(
|
||||
probability=True,
|
||||
random_state=42,
|
||||
@@ -23,7 +23,7 @@ def test_adaptive() -> None:
|
||||
)
|
||||
),
|
||||
"poly": CandidateClassifierSpecs(
|
||||
classifier=lambda: ScikitLearnClassifier(
|
||||
classifier=ScikitLearnClassifier(
|
||||
SVC(
|
||||
probability=True,
|
||||
kernel="poly",
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_cv() -> None:
|
||||
# Support vector machines with linear kernels do not perform well on this
|
||||
# data set, so predictor should return the given constant.
|
||||
clf = CrossValidatedClassifier(
|
||||
classifier=lambda: ScikitLearnClassifier(
|
||||
classifier=ScikitLearnClassifier(
|
||||
SVC(
|
||||
probability=True,
|
||||
random_state=42,
|
||||
@@ -41,7 +41,7 @@ def test_cv() -> None:
|
||||
# Support vector machines with quadratic kernels perform almost perfectly
|
||||
# on this data set, so predictor should return their prediction.
|
||||
clf = CrossValidatedClassifier(
|
||||
classifier=lambda: ScikitLearnClassifier(
|
||||
classifier=ScikitLearnClassifier(
|
||||
SVC(
|
||||
probability=True,
|
||||
kernel="poly",
|
||||
|
||||
Reference in New Issue
Block a user