get probabilities with customized cross validation and LinearSVC

0

I'm trying to get the probabilities of the predictions of a linear SVM model but using Python's LinearSVC function. I also have to do a custom cross validation. With my code it does not work. What am I doing wrong?

model= LinearSVC()

my_cv = GroupKFold(n_splits=3).split(X_test,y_test,order)

model.fit(X_train, y_train)

modelcalibrated = CalibratedClassifierCV(model, cv=my_cv)

result=cross_val_predict(modelcalibrated, X_test, y_test,cv=my_cv, method='predict_proba')

print(result)

It tells me the following error:

can't pickle generator objects
    
asked by adamista 19.06.2018 в 19:21
source

0 answers