Closed Jacques2101 closed 3 years ago
@moezali1 Can you update the tutorial to install pycaret[full]
and change whitelist
to include
? Thanks.
I did: pip install "pycaret[full]"
but after that when I run again the example file, I get new error message that I did not get previously:
from pycaret.classification import *
clf1 = setup(data, target = 'Purchase', session_id=123, log_experiment=True, experiment_name='juice1')
---------------------------------------------------------------------------
XGBoostError Traceback (most recent call last)
<ipython-input-4-33f83842c97a> in <module>
1 from pycaret.classification import *
----> 2 clf1 = setup(data, target = 'Purchase', session_id=123, log_experiment=True, experiment_name='juice1')
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/pycaret/classification.py in setup(data, target, train_size, test_data, preprocess, imputation_type, iterative_imputation_iters, categorical_features, categorical_imputation, categorical_iterative_imputer, ordinal_features, high_cardinality_features, high_cardinality_method, numeric_features, numeric_imputation, numeric_iterative_imputer, date_features, ignore_features, normalize, normalize_method, transformation, transformation_method, handle_unknown_categorical, unknown_categorical_method, pca, pca_method, pca_components, ignore_low_variance, combine_rare_levels, rare_level_threshold, bin_numeric_features, remove_outliers, outliers_threshold, remove_multicollinearity, multicollinearity_threshold, remove_perfect_collinearity, create_clusters, cluster_iter, polynomial_features, polynomial_degree, trigonometry_features, polynomial_threshold, group_features, group_names, feature_selection, feature_selection_threshold, feature_selection_method, feature_interaction, feature_ratio, interaction_threshold, fix_imbalance, fix_imbalance_method, data_split_shuffle, data_split_stratify, fold_strategy, fold, fold_shuffle, fold_groups, n_jobs, use_gpu, custom_pipeline, html, session_id, log_experiment, experiment_name, log_plots, log_profile, log_data, silent, verbose, profile, profile_kwargs)
578 log_plots = ["auc", "confusion_matrix", "feature"]
579
--> 580 return pycaret.internal.tabular.setup(
581 ml_usecase="classification",
582 available_plots=available_plots,
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/pycaret/internal/tabular.py in setup(data, target, ml_usecase, available_plots, train_size, test_data, preprocess, imputation_type, iterative_imputation_iters, categorical_features, categorical_imputation, categorical_iterative_imputer, ordinal_features, high_cardinality_features, high_cardinality_method, numeric_features, numeric_imputation, numeric_iterative_imputer, date_features, ignore_features, normalize, normalize_method, transformation, transformation_method, handle_unknown_categorical, unknown_categorical_method, pca, pca_method, pca_components, ignore_low_variance, combine_rare_levels, rare_level_threshold, bin_numeric_features, remove_outliers, outliers_threshold, remove_multicollinearity, multicollinearity_threshold, remove_perfect_collinearity, create_clusters, cluster_iter, polynomial_features, polynomial_degree, trigonometry_features, polynomial_threshold, group_features, group_names, feature_selection, feature_selection_threshold, feature_selection_method, feature_interaction, feature_ratio, interaction_threshold, fix_imbalance, fix_imbalance_method, transform_target, transform_target_method, data_split_shuffle, data_split_stratify, fold_strategy, fold, fold_shuffle, fold_groups, n_jobs, use_gpu, custom_pipeline, html, session_id, log_experiment, experiment_name, log_plots, log_profile, log_data, silent, verbose, profile, profile_kwargs, display)
263
264 try:
--> 265 from xgboost import __version__
266
267 logger.info(f"xgboost=={__version__}")
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/xgboost/__init__.py in <module>
7 import os
8
----> 9 from .core import DMatrix, DeviceQuantileDMatrix, Booster
10 from .training import train, cv
11 from . import rabit # noqa
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/xgboost/core.py in <module>
172
173 # load the XGBoost library globally
--> 174 _LIB = _load_lib()
175
176
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/xgboost/core.py in _load_lib()
155 if not lib_success:
156 libname = os.path.basename(lib_paths[0])
--> 157 raise XGBoostError(
158 'XGBoost Library ({}) could not be loaded.\n'.format(libname) +
159 'Likely causes:\n' +
XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded.
Likely causes:
* OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, libomp.dylib for Mac OSX, libgomp.so for Linux and other UNIX-like OSes). Mac OSX users: Run `brew install libomp` to install OpenMP runtime.
* You are running 32-bit Python on a 64-bit OS
Error message(s): ['dlopen(/Users/jacques/opt/anaconda3/envs/ml/lib/python3.8/site-packages/xgboost/lib/libxgboost.dylib, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib\n Referenced from: /Users/jacques/opt/anaconda3/envs/ml/lib/python3.8/site-packages/xgboost/lib/libxgboost.dylib\n Reason: image not found']
And the instruction that worked previously, now I get:
best_model = compare_models()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-5-e904bc054f74> in <module>
----> 1 best_model = compare_models()
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/pycaret/classification.py in compare_models(include, exclude, fold, round, cross_validation, sort, n_select, budget_time, turbo, errors, fit_kwargs, groups, verbose)
769 """
770
--> 771 return pycaret.internal.tabular.compare_models(
772 include=include,
773 exclude=exclude,
~/opt/anaconda3/envs/ml/lib/python3.8/site-packages/pycaret/internal/tabular.py in compare_models(include, exclude, fold, round, cross_validation, sort, n_select, budget_time, turbo, errors, fit_kwargs, groups, verbose, display)
1930
1931 # checking error for exclude (string)
-> 1932 available_estimators = _all_models
1933
1934 if exclude != None:
NameError: name '_all_models' is not defined
I needed to reinstall XGBoost with:
brew install libomp
pip3 install xgboost
I found this here https://xgboost.readthedocs.io/en/latest/build.html#building-on-osx
Then everything is ok.
Thx.
Hi, I am new with PyCaret and for learning more I tried to run the simple example you put on your site but get some errors that I do not understand.
then:
ensembled_models = compare_models(whitelist = models(type='ensemble').index.tolist(), fold = 3)
then:
catboost = create_model('catboost', cross_validation=False)
thx