I followed a tutorial for displaying the roc curves and the corresponding auc; I never used the ggplot library, thus I cannot understand where is my error. Here the code below:
from sklearn import metrics
import pandas as pd
from ggplot import *
preds = clf.predict_proba(Xtest)[:,1]
fpr, tpr, _ = metrics.roc_curve(ytest, preds)
df = pd.DataFrame(dict(fpr=fpr, tpr=tpr))
ggplot(df, aes(x='fpr', y='tpr')) + geom_line() + geom_abline(linetype='dashed')
This is the error:
slope needed for <ggplot.geoms.geom_abline.geom_abline object at 0x7fae7e7f8d90>
how could I fix this?