Questions tagged [scikit-plot]

scikit-plot is a visualization toolkit based on matplotlib for python. Use this tag together with `python`-tag (and `scikit-learn` if appropriate).

scikit-plot is a python package that approaches data visualization not as part of a presentation but as part of the process of data investigation.

It tries to simplify the generation of plots typically used in machine learning scenarios with as little boilerplate code as possible and hence proves an alternative to or .

16 questions
2
votes
0 answers

Why has subplot of matplotlib not the same size?

I am building a classifier in Python and would like to evaluate it. I already built some code that is plotting a few different metrics per class. Plot_metric() is a self defined function. gs = gridspec.GridSpec(1, 5, width_ratios=[5, 1, 1, 1,…
Jan D.M.
  • 2,284
  • 2
  • 20
  • 32
2
votes
0 answers

Why is the macro-average PR curve not implemented in Scikit-Learn?

For multiclass classification, the PR curves in the scikit-learn example (PR curve example) and the function to plot PR curves with scikit-plot (API Reference) both only implement the micro-average PR curve. While the corresponding example and…
1
vote
0 answers

AttributeError: module 'scikitplot' has no attribute 'plot_precision_recall_curve'

With the following code, I'm getting the error AttributeError: module 'scikitplot' has no attribute 'plot_precision_recall_curve'. rfc = RandomForestClassifier(verbose=True) #uses randomized decision trees rfcmodel = rfc.fit(X_over, y_over) y_pred =…
1
vote
0 answers

`scikitplot.metrics.plot_calibration_curve`, how to change the line-colour and line-type?

I am trying to use scikitplot.metrics.plot_calibration_curve to plot calibration curves for my models and would like to change the line-type (eg. dashed, solid, dotted) in the resulting charts. The simplest reproducible example I could make is…
Jeremy K.
  • 1,710
  • 14
  • 35
1
vote
1 answer

How to make subplots consisting of 6 charts to charts from the scikitplot library

I have six models and want to evaluate them with a ROC chart from sklearn.naive_bayes import GaussianNB from sklearn.linear_model import LogisticRegression from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import…
Wojciech Moszczyński
  • 2,893
  • 21
  • 27
1
vote
3 answers

Plot only Class 1 vs Baseline in Lift-curve and Cumulative-gains-chart in scikitplot

I am working on a problem of propensity modeling for an ad campaign. My data set consists of users who have historically clicked on the ads and those who have not clicked. To measure the performance of my model, I plotting cumulative gains and lift…
Anuj Gupta
  • 6,328
  • 7
  • 36
  • 55
1
vote
1 answer

How to merge the plots of 2 lift curves into a single graph in Python

I produced a lift curve of answers predicted through 2 models: logistic regression and decision tree. I get 2 separate plots on two separate graphs. I need a single graph depicting both the plots. How to do that? import scikitplot as…
0
votes
0 answers

How to customize plots that were made using "scikitplot.metrics" other than the arguments show in the function?

I made some graphs with scikit-plot package, but need to customize the axes colors and sizes as well the lines width. Here is what I already have plotted and the editable arguments of the function generating the…
0
votes
0 answers

Gains Chart and Lift Curve using scikit-plot for sequential model

Using Random forest model I generated the following predictive probabilities for class 0, and class 1 which is 2 dimensional array. yhatrf =RF.predict_proba(X_test) yhatrf array([[0.70388125, 0.29611875], [0.70388125, 0.29611875], …
ForestGump
  • 50
  • 2
  • 19
0
votes
1 answer

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

can anyone help me with this error? y_test['cEXT'].shape ,y_test['cEXT'].ndim # returns ((982,), 1) Y_test_probs.shape,Y_test_probs.ndim # returns ((982,), 1) # AOC ROC Curve import scikitplot as skplt Y_test_probs =…
Juned Ansari
  • 5,035
  • 7
  • 56
  • 89
0
votes
1 answer

Confusion matrix predicted labels

I am using the following piece of python code to generate a normalized confusion matrix import scikitplot as skplt skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) and this gives me the plot as shown here. However, I wanted to…
0
votes
1 answer

Plotting confusion matrix

I am trying to plot a confusion matrix using scikitplot.metrics.plot_confusion_matrix by following snippet code- import scikitplot as skplt Y_Test = [1, 0, 1, 0, 1, 1, 0, 1, 1 ,1 ,1, 1, 0, 0 ,0]; Y_Pred = [1, 0, 0, 0, 1, 1, 0, 1, 1 ,1 ,1, 1, 1, 0…
user3862410
  • 171
  • 1
  • 6
0
votes
2 answers

scikit-plot scaling is wrong

I'm trying to plot a confusion matrix in a jupyter notebook and the plot does not display properly. My code is: import scikitplot plt.close() scikitplot.metrics.plot_confusion_matrix(y_test, y_predicted_test) and this code produces the plot: Any…
user274610
  • 509
  • 9
  • 18
0
votes
0 answers

clf.fit(X, y) not running with small values - fit() never completes - potential sklearn bug : Data Science

This is not a fix my code question.(code works but not for the data used). This question directly relates to the sklearn fit() function call as a technical enquiry. Module call below. from sklearn import svm svm.SVC.fit(X,y) The code should…
Aza
  • 59
  • 1
  • 9
0
votes
1 answer

Seriously weird ROC curve

So I have a very challenging dataset to work with, but even with that in mind the ROC curves I am getting as a result seem quite bizarre and looks wrong. Below is my code - I have used the scikitplot library (skplt) for plotting ROC curves after…
Daniel Soutar
  • 827
  • 1
  • 10
  • 24
1
2