diff --git a/openmlpimp/plot/kde.py b/openmlpimp/plot/kde.py index ac03761..6c82016 100644 --- a/openmlpimp/plot/kde.py +++ b/openmlpimp/plot/kde.py @@ -6,11 +6,9 @@ import openmlpimp import os import matplotlib.pyplot as plt -import warnings from scipy.stats import rv_discrete -import autosklearn.constants from ConfigSpace.hyperparameters import CategoricalHyperparameter, NumericalHyperparameter from autosklearn.util.pipeline import get_configuration_space diff --git a/openmlpimp/utils/config_space.py b/openmlpimp/utils/config_space.py index 738c5de..15a3d9d 100644 --- a/openmlpimp/utils/config_space.py +++ b/openmlpimp/utils/config_space.py @@ -52,11 +52,11 @@ def get_config_space_casualnames(classifier, fixed_parameters=None): continue if isinstance(hyperparameter, ConfigSpace.CategoricalHyperparameter): - config_space_prime.add_hyperparameter(ConfigSpace.CategoricalHyperparameter(casualname, hyperparameter.choices, default=hyperparameter.default)) + config_space_prime.add_hyperparameter(ConfigSpace.CategoricalHyperparameter(casualname, hyperparameter.choices, default_value=hyperparameter.default_value)) elif isinstance(hyperparameter, ConfigSpace.UniformIntegerHyperparameter): - config_space_prime.add_hyperparameter(ConfigSpace.UniformIntegerHyperparameter(casualname, hyperparameter.lower, hyperparameter.upper, log=hyperparameter.log, default=hyperparameter.default)) + config_space_prime.add_hyperparameter(ConfigSpace.UniformIntegerHyperparameter(casualname, hyperparameter.lower, hyperparameter.upper, log=hyperparameter.log, default_value=hyperparameter.default_value)) elif isinstance(hyperparameter, ConfigSpace.UniformFloatHyperparameter): - config_space_prime.add_hyperparameter(ConfigSpace.UniformFloatHyperparameter(casualname, hyperparameter.lower, hyperparameter.upper, log=hyperparameter.log, default=hyperparameter.default)) + config_space_prime.add_hyperparameter(ConfigSpace.UniformFloatHyperparameter(casualname, hyperparameter.lower, hyperparameter.upper, log=hyperparameter.log, default_value=hyperparameter.default_value)) else: raise ValueError() return config_space_prime diff --git a/openmlpimp/utils/connect.py b/openmlpimp/utils/connect.py index 9e14a67..a429a43 100644 --- a/openmlpimp/utils/connect.py +++ b/openmlpimp/utils/connect.py @@ -7,7 +7,7 @@ from openml.exceptions import OpenMLServerException -from ConfigSpace.io.pcs_new import write +from ConfigSpace.read_and_write.pcs_new import write from ConfigSpace.hyperparameters import CategoricalHyperparameter, UniformFloatHyperparameter, \ UniformIntegerHyperparameter diff --git a/openmlpimp/utils/search.py b/openmlpimp/utils/search.py index 7a88989..0543e08 100644 --- a/openmlpimp/utils/search.py +++ b/openmlpimp/utils/search.py @@ -20,7 +20,7 @@ from sklearn.model_selection._split import check_cv from sklearn.model_selection._validation import _fit_and_score from sklearn.externals.joblib import Parallel, delayed -from sklearn.utils.fixes import rankdata +from sklearn.utils.stats import rankdata from sklearn.utils.fixes import MaskedArray from sklearn.utils.validation import indexable from sklearn.metrics.scorer import check_scoring