Comments (2)
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.
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()
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?
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)
- Adding string classes directly in ConfusionMatrix removes all stats. HOT 5
- Number of decimal points
- NPV Micro/Macro missed HOT 1
- Jaccard Index vs IoU HOT 3
- cm.plot不显示图片
- 图片该如何保存?使用plt.savefig()保存的是一张空白图片 HOT 2
- Decimal points in plot method HOT 9
- Packaging on conda-forge HOT 4
- Doctests fail when `pytest` is run HOT 3
- Codecov bug
- Markdown - HTML mix bug in the document Notice section
- Improving Documentation HOT 4
- Deprecation of `setup.py install` when `wheel` is absent HOT 1
- Deprecated decorator
- Brb
- Modern issue templates HOT 1
- Python 3.12 support
- New diagrams
- adding concordance index and Brier score to overall/class statistics depicted for survival model predictions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycm.