-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
pycaret version checks
-
I have checked that this issue has not already been reported here.
-
I have confirmed this bug exists on the latest version of pycaret.
-
I have confirmed this bug exists on the master branch of pycaret (pip install -U git+https://github.com/pycaret/pycaret.git@master).
Issue Description
i'm trying to use leave one group out with pycaret and i'm reciving the following error
ValueError: The 'groups' parameter should not be None.
Reproducible Example
!pip install --pre pycaret
from sklearn.model_selection import LeaveOneGroupOut
logo = LeaveOneGroupOut()
from pycaret.datasets import get_data
data = get_data('juice')
from pycaret.classification import *
s = setup(data, target = 'Purchase',fold_strategy=logo,fold_groups='STORE')
rff= create_model('rf')
Expected Behavior
creating multiple folds in each fold one group is holdout for validation
Actual Results
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-8-013016ca3ef0> in <module>
----> 1 rff= create_model('rf')
6 frames
/usr/local/lib/python3.8/dist-packages/sklearn/model_selection/_split.py in get_n_splits(self, X, y, groups)
1178 """
1179 if groups is None:
-> 1180 raise ValueError("The 'groups' parameter should not be None.")
1181 groups = check_array(groups, ensure_2d=False, dtype=None)
1182 return len(np.unique(groups))
ValueError: The 'groups' parameter should not be None.
Installed Versions
Replace this line with the output of the version code above.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request