I'm trying to build validation curve that relying on max_depth but keep getting an error:
n_splits=10 cannot be greater than the number of members in each class.
I tried to put n_splits with different values, error doesnt change. I got data from .cvs file with numeric data
Here is code fragment that gets error:
from sklearn.tree import DecisionTreeClassifier
model = DecisionTreeClassifier(random_state=123)
cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=132)
train_scores, valid_scores = validation_curve(model, X, y, param_name="max_depth", n_jobs=-1,
param_range=np.arange(1, 20), cv=10, scoring="accuracy")
Im working in Jupiter Lite.