fcakyon / confplot Goto Github PK
View Code? Open in Web Editor NEWConfusion Matrix in Python: Plot a pretty confusion matrix (like Matlab) in python using seaborn and matplotlib
License: Apache License 2.0
Confusion Matrix in Python: Plot a pretty confusion matrix (like Matlab) in python using seaborn and matplotlib
License: Apache License 2.0
confplot.plot_confusion_matrix_from_data(
y_test,
pred,
columns,
figsize=(10,10),
%colors
)
Hello, I have used this package for my ml multiclass modeling alot. I like the formatting and the level of details in the plot. But recently I have noticed that the coloring of the plot are broken. I suspect that it might be related to recent updates in some of the dependencies.
Here is what I get with the following code
# import package
import confplot
from pandas import DataFrame
import numpy as np
# assume you have a confusion matrix array like this
array = np.array( [[13, 0, 1, 0, 2, 0], [ 0, 50, 2, 0, 10, 0], [ 0, 13, 16, 0, 0, 3], [ 0, 0, 0, 13, 1, 0], [ 0, 40, 0, 1, 15, 0], [ 0, 0, 0, 0, 0, 20]] )
# convert it to a pandas dataframe
df_cm = DataFrame(array, index=range(1, 7), columns=range(1, 7))
# create and save confusion matrix plot as "cm_plot.png"
confplot.plot_confusion_matrix_from_matrix(df_cm)
As you can see the diagonal and the last row/columns are not in the color they used to be. I dug into the code and it looks like the plot rendering neglects the facecolor updates in the quadmesh.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.