Issue
Hi I have been trying to fix this error that keeps coming up. I have tried everything online like reinstalling sklearn to the proper version documented on the GitHub repo and website. there were many more cannot recall but if anyone has any recommendations please let me know.
ImportError Traceback (most recent call last) input In [225], in <cell line: 3>() 1 import pycaret 2 # from pycaret.clustering import setup, create_model, evaluate_model, predict_model, save_model, load_model ----> 3 from pycaret.clustering import *
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\clustering_init_.py:1, in ----> 1 from pycaret.clustering.oop import ClusteringExperiment 2 from pycaret.clustering.functional import ( 3 setup, 4 create_model, (...) 24 set_current_experiment, 25 ) 27 all = [ 28 "ClusteringExperiment", 29 "setup", (...) 50 "set_current_experiment", 51 ]
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\clustering\oop.py:2, in 1 from pycaret.internal.pycaret_experiment.utils import MLUsecase ----> 2 from pycaret.internal.pycaret_experiment.unsupervised_experiment import ( 3 _UnsupervisedExperiment, 4 ) 5 import pycaret.internal.patches.sklearn 6 import pycaret.internal.patches.yellowbrick
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\internal\pycaret_experiment\unsupervised_experiment.py:20, in 18 from pycaret.internal.preprocess.preprocessor import Preprocessor 19 from pycaret.internal.pycaret_experiment.utils import highlight_setup, MLUsecase ---> 20 from pycaret.internal.pycaret_experiment.tabular_experiment import _TabularExperiment 21 from pycaret.internal.pipeline import ( 22 Pipeline as InternalPipeline, 23 estimator_pipeline, 24 get_pipeline_fit_kwargs, 25 ) 26 from pycaret.internal.utils import to_df, infer_ml_usecase, mlflow_remove_bad_chars
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\internal\pycaret_experiment\tabular_experiment.py:18, in 16 import pycaret.internal.patches.sklearn 17 import pycaret.internal.patches.yellowbrick ---> 18 import pycaret.internal.persistence 19 import pycaret.internal.preprocess 20 import scikitplot as skplt # type: ignore
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\internal\persistence.py:9, in 6 from sklearn.pipeline import Pipeline 7 from pycaret.internal.utils import get_logger ----> 9 from pycaret.utils.time_series.forecasting.pipeline import add_model_to_pipeline 10 from pycaret.internal.pycaret_experiment.utils import MLUsecase 13 def deploy_model( 14 model, model_name: str, authentication: dict, platform: str = "aws", prep_pipe=None 15 ):
File ~\AppData\Roaming\Python\Python38\site-packages\pycaret\utils\time_series\forecasting\pipeline.py:3, in 1 from copy import deepcopy 2 from sktime.forecasting.base import BaseForecaster ----> 3 from sktime.forecasting.compose import ForecastingPipeline 4 from sktime.forecasting.compose import TransformedTargetForecaster 7 class PyCaretForecastingPipeline(ForecastingPipeline):
File ~\AppData\Roaming\Python\Python38\site-packages\sktime\forecasting\compose_init_.py:28, in 8 all = [ 9 "ColumnEnsembleForecaster", 10 "EnsembleForecaster", (...) 24 "make_reduction", 25 ] 27 from sktime.forecasting.compose._column_ensemble import ColumnEnsembleForecaster ---> 28 from sktime.forecasting.compose._ensemble import ( 29 AutoEnsembleForecaster, 30 EnsembleForecaster, 31 ) 32 from sktime.forecasting.compose._multiplexer import MultiplexForecaster 33 from sktime.forecasting.compose._pipeline import ( 34 ForecastingPipeline, 35 TransformedTargetForecaster, 36 )
File ~\AppData\Roaming\Python\Python38\site-packages\sktime\forecasting\compose_ensemble.py:21, in 19 from sktime.forecasting.base._base import DEFAULT_ALPHA 20 from sktime.forecasting.base._meta import _HeterogenousEnsembleForecaster ---> 21 from sktime.forecasting.model_selection import temporal_train_test_split 22 from sktime.utils.stats import ( 23 _weighted_geometric_mean, 24 _weighted_max, 25 _weighted_median, 26 _weighted_min, 27 ) 28 from sktime.utils.validation.forecasting import check_regressor
File ~\AppData\Roaming\Python\Python38\site-packages\sktime\forecasting\model_selection_init_.py:22, in 20 from sktime.forecasting.model_selection._split import SlidingWindowSplitter 21 from sktime.forecasting.model_selection._split import temporal_train_test_split ---> 22 from sktime.forecasting.model_selection._tune import ForecastingGridSearchCV 23 from sktime.forecasting.model_selection._tune import ForecastingRandomizedSearchCV
File ~\AppData\Roaming\Python\Python38\site-packages\sktime\forecasting\model_selection_tune.py:13, in 11 from sklearn.base import clone 12 from sklearn.model_selection import ParameterGrid, ParameterSampler, check_cv ---> 13 from sklearn.model_selection._search import _check_param_grid 14 from sklearn.utils.metaestimators import if_delegate_has_method 16 from sktime.exceptions import NotFittedError
ImportError: cannot import name '_check_param_grid' from 'sklearn.model_selection._search' (C:\Users\
hashi\Anaconda3\lib\site-packages\sklearn\model_selection_search.py)
Solution
This problem might be related to the version of scikit-learn package.
Answered By - binaryskull
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.