Giter VIP home page Giter VIP logo

Comments (4)

reiinakano avatar reiinakano commented on May 17, 2024 12

@lugq1990 is correct. I never liked scikit-learn's roc_curve because I had to pick a positive class. I designed plot_roc_curve to work directly with the output of predict_proba.

Although I do realize now it could be useful for binary classifiers with decision_function, whose output is a 1D array. Perhaps somebody could extend the code of plot_roc_curve to work with a 1D array.

from scikit-plot.

lugq1990 avatar lugq1990 commented on May 17, 2024 7

In the scikit-plot, if you want to plot the ROC curve for a binary classification problem, the needed prob is a 2-dimentional array, maybe you just past a 1-D prob to the plot_roc_curve(). So you need to make the 1-D to 2-D just like this : np.concatenate((1-y_probas,y_probas),axis=1). Try this .

from scikit-plot.

TarunTater avatar TarunTater commented on May 17, 2024

@lugq1990 - ya, changing the numpy array to 2D worked. Thanks for your suggestion!

from scikit-plot.

victorheuer avatar victorheuer commented on May 17, 2024

This exact problem is occurring for me. I'll try @lugq1990 's solution. Thank you!

from scikit-plot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.