Giter Club home page Giter Club logo

Comments (2)

huhang14 avatar huhang14 commented on September 28, 2024 1

Thank you for your answer, it's very helpful for me!
I am using Ubuntu 18.04.1 LTS with the following code

cm.plot(cmap=plt.cm.Blues, number_label=True, plot_lib="matplotlib")

After testing, I can get a normal display with the same code on windows, but not on ubuntu.
Meanwhile, I ran other code for drawing confusion matrix on ubuntu

sns.heatmap(conf_matrix, annot=True, annot_kws={"size": 14}, cmap="Blues")

Sadly, this code also does not display the confusion matrix properly. So this probably has nothing to do with pycm, but is caused by something else. Thanks again for your answer.

from pycm.

sadrasabouri avatar sadrasabouri commented on September 28, 2024

Description

Hello sepandhaghighi, thank you for writing such a convenient and useful library. I have two questions. can pycm plot ROC curves? I didn't find anything about it in the documentation.

Hi @huhang14, I hope you are doing well. We are happy you found Pycm useful for your work.
The ROC Curve has been added in version 3.7 and you can use it like the code below. You can also find more examples in Document.ipynb.

import numpy as np
from pycm import ROCCurve
import matplotlib.pyplot as plt

crv = ROCCurve(
    actual_vector=np.array([1, 1, 2, 2]),
    probs=np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]),
    classes=[2, 1])

crv.plot(classes=[2])
plt.show()

roc

You may be right about README.md document section. @sepandhaghighi should we add an example with a plotted curve in README.md, too?

Also, I can display the confusion matrix normally under windows system, but it displays abnormally under linux system, do you know what causes it? image

pycm version: 3.8

I don't know about this 😕
Would you please provide us with more details? (like your operating system version, the code you're running and etc.)

from pycm.

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.