【发布时间】:2022-09-29 01:36:03
【问题描述】:
嗨,我一直在尝试修复这个不断出现的错误。我已经尝试了所有在线方法,例如将 sklearn 重新安装到 GitHub 存储库和网站上记录的正确版本。还有更多不记得了,但如果有人有任何建议,请告诉我。
ImportError Traceback(最近一次调用最后一次) 输入在 [225] 中,在 <cell line: 3>() 1 导入 pycaret 2 # from pycaret.clustering 导入设置、create_model、evaluate_model、predict_model、save_model、load_model ----> 3 来自 pycaret.clustering 导入 *
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\clustering_在里面_.py:1, 在 ----> 1 从 pycaret.clustering.oop 导入 ClusteringExperiment 2 从 pycaret.clustering.functional 导入( 3设置, 4 创建模型,(...) 24 set_current_experiment, 25) 27全部= [ 28 “聚类实验”, 29 \"设置\", (...) 50 \"set_current_experiment\", 51]
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\clustering\\oop.py:2, 在 1 从 pycaret.internal.pycaret_experiment.utils 导入 MLUsecase ----> 2 从 pycaret.internal.pycaret_experiment.unsupervised_experiment 导入( 3 _无监督实验, 4) 5 导入pycaret.internal.patches.sklearn 6 导入 pycaret.internal.patches.yellowbrick
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\internal\\pycaret_experiment\\unsupervised_experiment.py:20, 在 18 从 pycaret.internal.preprocess.preprocessor 导入预处理器 19 从 pycaret.internal.pycaret_experiment.utils 导入 highlight_setup, MLUsecase ---> 20 从 pycaret.internal.pycaret_experiment.tabular_experiment 导入 _TabularExperiment 21 从 pycaret.internal.pipeline 导入 ( 22 管道作为内部管道, 23 估计器_管道, 24 get_pipeline_fit_kwargs, 25) 26 从 pycaret.internal.utils 导入 to_df、infer_ml_usecase、mlflow_remove_bad_chars
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\internal\\pycaret_experiment\\tabular_experiment.py:18, 在 16 导入 pycaret.internal.patches.sklearn 17 导入 pycaret.internal.patches.yellowbrick ---> 18 导入 pycaret.internal.persistence 19 导入 pycaret.internal.preprocess 20 import scikitplot as skplt # type: ignore
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\internal\\persistence.py:9, 在 6 从 sklearn.pipeline 导入管道 7 从 pycaret.internal.utils 导入 get_logger ----> 9 从 pycaret.utils.time_series.forecasting.pipeline 导入add_model_to_pipeline 10 从 pycaret.internal.pycaret_experiment.utils 导入 MLUsecase 13 定义部署模型( 14 模型,模型名称:str,身份验证:dict,平台:str = \"aws\",prep_pipe=无 15):
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\pycaret\\utils\\time_series\\forecasting\\pipeline.py:3, 在 1 从复制导入 deepcopy 2 从 sktime.forecasting.base 导入 BaseForecaster ----> 3 from sktime.forecasting.compose import ForecastingPipeline 4 从 sktime.forecasting.compose 导入 TransformedTargetForecaster 7类PyCaretForecastingPipeline(ForecastingPipeline):
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\sktime\\forecasting\\compose_在里面_.py:28, 在 8全部= [ 9 \"ColumnEnsembleForecaster\", 10 \"EnsembleForecaster\", (...) 24 \"make_reduction\", 25] 27 从 sktime.forecasting.compose._column_ensemble 导入 ColumnEnsembleForecaster ---> 28 来自 sktime.forecasting.compose._ensemble 导入( 29 AutoEnsembleForecaster, 30 EnsembleForecaster, 31) 32 从 sktime.forecasting.compose._multiplexer 导入 MultiplexForecaster 33 从 sktime.forecasting.compose._pipeline 导入( 34 预测管道, 35 变换目标预测器, 36)
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\sktime\\forecasting\\compose_ensemble.py:21, 在 19 从 sktime.forecasting.base._base 导入 DEFAULT_ALPHA 20 来自 sktime.forecasting.base._meta 导入 _HeterogenousEnsembleForecaster ---> 21 从 sktime.forecasting.model_selection 导入 temporal_train_test_split 22 从 sktime.utils.stats 导入 ( 23 _weighted_geometric_mean, 24 _weighted_max, 25 _weighted_median, 26 _weighted_min, 27) 28 来自 sktime.utils.validation.forecasting 导入 check_regressor
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\sktime\\forecasting\\model_selection_在里面_.py:22, 在 20 从 sktime.forecasting.model_selection._split 导入 SlidingWindowSplitter 21 从 sktime.forecasting.model_selection._split 导入 temporal_train_test_split ---> 22 来自 sktime.forecasting.model_selection._tune 导入 ForecastingGridSearchCV 23 从 sktime.forecasting.model_selection._tune 导入 ForecastingRandomizedSearchCV
文件 ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\sktime\\forecasting\\model_selection_tune.py:13, 在 11 从 sklearn.base 导入克隆 12 从 sklearn.model_selection 导入 ParameterGrid、ParameterSampler、check_cv ---> 13 来自 sklearn.model_selection._search 导入 _check_param_grid 14 从 sklearn.utils.metaestimators 导入 if_delegate_has_method 16 从 sktime.exceptions 导入 NotFittedError
ImportError:无法导入名称 \'_check_param_grid\' 来自 \'sklearn.model_selection._search\' (C:\\Users\\
hash\\Anaconda3\\lib\\site-packages\\sklearn\\model_selection_search.py)
-
请提供足够的代码,以便其他人可以更好地理解或重现该问题。
标签: python scikit-learn pycaret