how to build a lift chart using scikitplot I am trying to build a lift chart using scikitplot library.
I am getting the following can anyone guide with the error.
please find the code with the error
CODE:
import scikitplot as skplt
actual = df['Actual']
predicted = df['Pred']

skplt.metrics.plot_lift_curve(act,pdt)

Error:
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
&lt;ipython-input-38-f14ae9c16143&gt; in &lt;module&gt;
      6 pdt = np.array(predicted)
      7 # plotLiftChart(actual,predicted)
----&gt; 8 skplt.metrics.plot_lift_curve(act,pdt)
      9 # plt.show()

~\Anaconda3\lib\site-packages\scikitplot\metrics.py in plot_lift_curve(y_true, y_probas, title, ax, figsize, title_fontsize, text_fontsize)
   1192 
   1193     # Compute Cumulative Gain Curves
-&gt; 1194     percentages, gains1 = cumulative_gain_curve(y_true, y_probas[:, 0],
   1195                                                 classes[0])
   1196     percentages, gains2 = cumulative_gain_curve(y_true, y_probas[:, 1],

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

please guide where I have done the mistake
The mistake is not to have read the documentation ;)

scikitplot.metrics.plot_lift_curve(y_true, y_probas,...)
Parameters:

y_true (array-like, shape (n_samples)) – Ground truth (correct) target values.
y_probas (array-like, shape (n_samples, n_classes)) – Prediction probabilities for each class returned by a classifier.


The second parameter y_probas should be a double-dimension array of the predicted probabilities for every class, not a single dimension array of the predicted class.
You can also check the example provided in the documentation which contains:
y_probas = lr.predict_proba(X_test)