Questions tagged [pycaret]
Use this tag for questions regarding the use of the PyCaret machine learning library.
158
questions
0
votes
0
answers
20
views
TransformerWrapper' object has no attribute '_memory_transform
I used PyCaret 3.0-rc. I developed model and saved them. after almost 3 weeks, now I loaded model. But when I want to use them :
train_predictions = predict_model(model, data=train)
I got the ...
0
votes
1
answer
93
views
plot_model, evaluate_model (pycaret) not producing any output in Azure databricks
Im trying to evaluate / plot the various model results using pycaret but I'm not able to do so.
for example :-
from pycaret.datasets import get_data
juice = get_data('juice')
from pycaret....
-1
votes
0
answers
17
views
Scikit-Learn version <0.24.2 needed to work with Pycaret, but KNNImputer now not working [closed]
When I installed Scikit-Learn 1.1.1 KNNImputer worked brilliantly.
I then wanted to use Pycaret, but it won't work with Scikit 1.1.1
So I uninstalled Scikit, and reinstalled 0.24.2 (I also tried 0.23....
0
votes
0
answers
13
views
What is this paramater in Pycaret setup?
What are the values encoding_method can take for categorical encoding in setup, leaving the default leave one out method. I do not see the non default values it can take in the documentation
0
votes
1
answer
25
views
Getting Import Error: cannot import name 'Iterable' from 'collections' in pycaret
I am using 3.10 version of python and while running pycaret.classification i am getting below error.
1 #init setup
----> 3 from pycaret.classification import *
4 s = setup(data, target =...
0
votes
0
answers
10
views
Pycaret time series cv and binary classification
is it possible to first use cross validation with ExpandingWindowSplitter on a time series dataset and then fit the folds on classification binary models?
0
votes
0
answers
33
views
Get parameter estimates from logistic regression model using pycaret
I am training and tuning a model in pycaret such as:
from pycaret.classification import *
clf1 = setup(data = train, target = 'target', feature_selection = True, test_data = test, ...
0
votes
0
answers
27
views
KeyError '_Booster'
I am getting this error when trying to deploy my code in streamlit, the pkl file is saved and trained using pycaret.
save_model(tuned_blender,'Final_tuned_blender_air_pollution_updated',model_only=...
0
votes
0
answers
10
views
How to drop the column name used for groupkfold cross validation while creating the model?
In pycaret if I am using 'groupkfold' for implementing the cross validation. I need to pass a string representing the column name for doing that. However, I don't want to use the data in that ...
0
votes
0
answers
54
views
Custom cross-validation and pycaret
I've been working with hierarchical time series, and, as a result, I needed to create my own CV to make sure that all timestamps and products are included evenly in the test (validation) set. It ...
1
vote
0
answers
55
views
Using SKORCH with PyCaret for Regression problems
Using the fantastic article https://towardsdatascience.com/pycaret-skorch-build-pytorch-neural-networks-using-minimal-code-57079e197f33 there is a great example of using SKORCH and PyCaret to do ...
1
vote
0
answers
16
views
Problems using PyCaret for time series [duplicate]
I am new to python and want to use Pycaret to analyze time series. I created a conda environment and installed pycaret via conda install pycaret-ts-alpha.
But then, when I want to execute from pycaret....
0
votes
0
answers
49
views
TypeError: No valid mtype could be identified
Im currently working with the TimeSeries alpha function in jupyter notebook. My dataframe consists of 56088 rows and 4 columns. I have the frequency set to the minute and I have used ffill to populate ...
0
votes
2
answers
32
views
sklearn2pmml error with pycaret model to pmml : The object is not an instance of BaseEstimator
creating a model using pycaret with no issue so far (trained a bunch of different models) but when using catboost, I cannot save to pmml. This very same code worked for xgboost and lightgbm with the ...
0
votes
0
answers
36
views
Update PyCaret Anomaly detection Model
I'm detecting anomalies in a time series data using pycaret. I'm taking in the data at every call, detecting and returning it. Everything is fine, but when coming to improving the performance, I'm ...
0
votes
0
answers
26
views
Tuned Model giving poor results compared to default trained model in regression using Extratrees in pycaret
I am using pycaret for regression on some data set. Though in the examples given in the pycaret tutorial the improvement is seen in the tuned model compared to regular trained model. However, for my ...
0
votes
1
answer
70
views
PyCaret on Google Colab: "Estimator xgboost not available"
I have installed pycaret and xgboost as follows:
!pip install pycaret==2.3.10 markupsafe==2.0.1 pyyaml==5.4.1 --use-deprecated=legacy-resolver -qq
!pip install xgboost
But when I try to create the ...
0
votes
0
answers
68
views
Cant install Pycaret within my poetry enviornment
I am trying to install pycaret[FULL] in my poetry env however it keeps on giving me this error:
'Cant install following package:
Numpy'
However my pyproect.toml file already has a numpy installed. I ...
0
votes
2
answers
115
views
How to save the model comparison dataframe from compare_models() in pycaret?
I want to save the model comparison data frame from compare_models() in pycaret.
# load dataset
from pycaret.datasets import get_data
diabetes = get_data('diabetes')
# init setup
from pycaret....
1
vote
2
answers
3k
views
Cannot import name 'soft_unicode' from 'markupsafe' in google colab
I'm trying to install pycaret==3.0.0 in google colab, But I'm having a problem, the library requires Jinja2 to be installed which I did, but then It finally throws off another error.
ImportError ...
0
votes
1
answer
81
views
Pycaret plot_model not properly
I got this error code when i try to use plot_model()
---> 16 from scipy.fftpack.helper import _init_nd_shape_and_axes_sorted
17 from numpy import (allclose, angle, arange, argsort, array, ...
0
votes
1
answer
280
views
installing pycaret library not completed due to an error
I am trying to install pycaret library but gives me an error.
I have tried to update pip but nothing changed
error: could not create 'build\bdist.win-amd64\wheel\.\sklearn\datasets\tests\data\openml\...
0
votes
2
answers
540
views
setup() got an unexpected keyword argument 'silent'
I Have been trying to use PyCaret library, but when I use the function setup() as shown in my code, it gives me an error of unexpected keyword argument. I have been trying to set argument silent to be ...
0
votes
0
answers
12
views
How to extract Tp,Tn,Fp and Fn from PyCaret
Can i extract Tp,Tn,Fp and Fn as numbers from confusion matrix with PyCaret or they are only given as plot?
0
votes
2
answers
119
views
test/train splits in pycaret using a column for grouping rows that should be in the same split
My dataset contains a column with some data I need to use for splitting by groups in a way that rows belonging to same group should not be divided into train/test but sent as a whole to one of the ...
0
votes
2
answers
79
views
How to print the prediction interval (upper and lower bound) in pycaret-ts-alpha
I want to know how to determine the prediction interval (upper and lower bound) in pycaret-ts-alpha.
I am only trying to forecast one point value, but I need to determine it's upper and lower bound.
...
0
votes
1
answer
97
views
Should tune_model be Called After compare_models in PyCaret?
With pycaret, it is possible to call the compare_models() function and get the model that best fits our data. This will look something like this,
# load dataset
from pycaret.datasets import get_data
...
1
vote
1
answer
61
views
I'm having this error with pycaret: module 'xgboost' has no attribute '__version__'
File ~\mlenv\lib\site-packages\pycaret\containers\models\regression.py:1448, in XGBRegressorContainer.init(self, globals_dict)
1445 self.active = False
1446 return
-> 1448 if version.parse(...
-1
votes
1
answer
15
views
Numeric feature in setup function
I want to pass all my features(100+) as a numeric feature is there any method to do it without writing all features in the setup column?
0
votes
0
answers
32
views
PyCaret: why train dataset 's R2 getted from residuals plot is different from create_model() 's R2?
I create PyCaret Catboost model applied to my dataset.
R2 value for train data = 0.69 (mean for 5 folds).
catboost = create_model("catboost", fold = 5)
When I plot "residuals plot"...
1
vote
1
answer
253
views
Pycaret cannot imported due to another import error
ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (c:\users\ezgi\appdata\local\programs\python\python38\lib\site-packages\sklearn\utils\fixes.py)
To fix I update ...
2
votes
1
answer
436
views
pycaret.time_series.TSForecastingExperiment ImportError: cannot import name '_check_param_grid' from 'sklearn.model_selection._search'
I am getting the below error, while importing Pycaret time-series(beta) module in the databricks (we were running successfully earlier). Request your help in solving the issues.
pycaret version in use:...
0
votes
0
answers
80
views
PyCaret ensemble_model() function accepts ONLY one model for Bagging method
I'm using PyCaret library.
First I compare best models applied to my dataset with:
top4 = compare_models(sort = 'RMSE', fold = 5, n_select=4)
Results:
Model MAE MSE RMSE R2 RMSLE MAPE ...
1
vote
2
answers
2k
views
Error when installing pycaret (jinja2) on Colab
I'm trying to use pyCaret on Colab. This is the setup:
!pip install pycaret
from pycaret.classification import *
grid = setup(data=s, target=s.columns[-1], html=False, silent=True, verbose=False)
...
0
votes
1
answer
174
views
When I use Pycaret predict_model(dt,data=data_unseen) to analyze only one row appears
I use Python pycaret module to analyze big set of data. I did setup, compare_model, create_model correctly, but when I try to use model I created to predict the unseen_date I splite from beginning, ...
1
vote
0
answers
469
views
Jinja2 not found error when using pycaret
I am trying this code in Google Colab
!pip install pycaret
As part of the install it gives this message
Installing collected packages: jinja2
Attempting uninstall: jinja2
Found existing ...
0
votes
1
answer
135
views
How to skip pycaret data type validation step in docker
While we create a pycaret setup, e.g.:
from pycaret.regression import all
exp_reg101 = setup(data = data, target = 'Price', session_id=123,preprocess=False)
It will ask us to verify the data types ...
0
votes
1
answer
188
views
how to view the transformed data in pycaret?
I have been following the "diamond" data example here
https://pycaret.gitbook.io/docs/learn-pycaret/official-blog/easy-mlops-with-pycaret-and-mlflow
s = setup(data,
target = '...
0
votes
0
answers
34
views
bad practice importing pycaret from official docs
Read all documentation from pycaret and many tutorials and examples.
https://pycaret.gitbook.io/docs/get-started/tutorials
All of them started this way:
#For Regression
from pycaret.regression import *...
6
votes
3
answers
5k
views
Unable to resolve import error from PyCaret
I am trying to install pycaret by creating an environment in anaconda (python 3.8). Everything is fine except when i tried to from pycaret.classification import * i shows an error despite the fact ...
0
votes
2
answers
236
views
Output for PyCaret compare_models() function shows less models than PyCaret models supported
New on PyCaret, I don't understand several things about this library:
According to this tutorial, https://github.com/pycaret/pycaret/blob/master/tutorials/Regression%20Tutorial%20Level%20Beginner%20-%...
0
votes
0
answers
48
views
sparse matrix use in pycaret for nlp
First of all, thank you for allowing me to use this wonderful library
I am doing Korean NLP now
So I pre-processed Korean and converted it into a Tfidf Vectorizer.
I'm going to put it in setup() and ...
2
votes
1
answer
256
views
Error while installing PyCaret in GCP's JupyterLab
I am trying to install PyCaret in GCP(Google Cloud Platform) JupyterLab. I am getting error while installing the PyCaret package.
I was using !pip install pycaret to install the package but I was ...
0
votes
0
answers
26
views
How to extract class labels from pycaret setup?
Using pycaret 2.3.10 for a multi-class problem.
from pycaret.classification import *
...
config = setup(X_null, 'YEAR', silent=True, fold=5, use_gpu=True, )
How can I extract the class labels? I know ...
0
votes
1
answer
275
views
Pycaret - whats is the parameter for custom grid of tune model
I was trying to set parameters for tune_model function's custom_grid
tune_model(model, n_iter=50, custom_grid={'learning_rate':0.5})
and it will give me this error
Parameter value is not iterable or ...
-1
votes
1
answer
189
views
How do I get the MAE, RMSE, MSE and R^2 on a Pycaret model?
I am trying to get the MAE, RMSE, MSE and R^2 on a model, but actually it only gives me some metrics that are used mostly on classification, not on regression .
These are the metrics that the model ...
0
votes
2
answers
385
views
Pycaret classification.compare_models does not display results grid
From the documentation and tutorials for pycaret, I expect the classification.compare_models() function to return a grid such as...
Model
Accuracy
AUC
Recall
Prec.
F1
Kappa
MCC
TT (Sec)
0
Naive ...
0
votes
1
answer
34
views
Pycaret installtion error on Windows VM (AWS)
I have been trying to install pycaret (ML library in python) on windows vm hosted on aws.
This library installs all the pre requisite libraries for doing ML such as numpy, pandas, sklearn, etc, etc.
...
0
votes
1
answer
21
views
DataframeIndex duplicated values found when they don't exist
I have the following dataset where the index is DatetimeIndex and the column "value" is made of floats. The index: creationDate contains only information of the day 2020-06-13.
df
df[df....
0
votes
1
answer
346
views
Pycaret plot_model() visualize graph not properly
When I used plot_model() on Pycaret in Colabs, I got unusable graph like this.
My graph
How I can use zoom slicing on my graph like this? They just using normal plot_model() and got zoom slicing ...