From 08ad02f0a1174ff917ac96c525f01971bf9d7e66 Mon Sep 17 00:00:00 2001 From: nickotto Date: Wed, 9 Oct 2024 23:02:23 -0700 Subject: [PATCH] updating the import calibration --- tpot2/config/get_configspace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tpot2/config/get_configspace.py b/tpot2/config/get_configspace.py index 22a3bf5e..d4e80875 100644 --- a/tpot2/config/get_configspace.py +++ b/tpot2/config/get_configspace.py @@ -37,6 +37,7 @@ from sklearn.svm import SVC, SVR, LinearSVR, LinearSVC from lightgbm import LGBMClassifier, LGBMRegressor import sklearn +import sklearn.calibration as calibration from sklearn.naive_bayes import GaussianNB, BernoulliNB, MultinomialNB from sklearn.decomposition import FastICA, PCA from sklearn.cluster import FeatureAgglomeration @@ -525,7 +526,7 @@ def get_node(name, n_classes=3, n_samples=100, n_features=100, random_state=None if name == "LinearSVC_wrapped": ext = get_node("LinearSVC", n_classes=n_classes, n_samples=n_samples, random_state=random_state) - return WrapperPipeline(estimator_search_space=ext, method=sklearn.calibration.CalibratedClassifierCV, space={}) + return WrapperPipeline(estimator_search_space=ext, method=calibration.CalibratedClassifierCV, space={}) if name == "RFE_classification": rfe_sp = get_configspace(name="RFE", n_classes=n_classes, n_samples=n_samples, random_state=random_state) ext = get_node("ExtraTreesClassifier", n_classes=n_classes, n_samples=n_samples, random_state=random_state)