Comments (4)
Hi @ArmandGiraud , could you give small sample code demonstrating the problem?
from scikit-plot.
Hi @reiinakano i tried to reproduce the issue with the digits dataset
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from scikitplot import plotters as skplt
import pandas as pd
digits = load_digits()
%matplotlib inline
X = digits.data
y = digits.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)
test = pd.DataFrame(X_test)
test['target'] = y_test
test_reduced = test.ix[test.target!=0,:]
X_test_reduced = test_reduced.drop('target',axis=1)
y_test_reduced = test_reduced.target
print(set(y_test_reduced)) # we removed 0 from test set.
lr = LogisticRegression(tol=5) # i set high tolerance so that the classifier sitll predicts some 0's
lr.fit(X_train,y_train)
y_pred = lr.predict(X_test_reduced)
skplt.plot_confusion_matrix(y_test_reduced, y_pred)
From the matrix we can read that the true values contains no occurrences of 1, but it actually does, this first line should refer to 0.
sorry for the ugly syntax, i'm kind of new to python.
thx
from scikit-plot.
Hi @ArmandGiraud , you're absolutely right, this was a bug in the implementation. Rest assured this has been fixed in #29 and is now in the v0.2.5 release. Just run pip install scikit-plot --upgrade
and you should be good to go. :)
Thanks for using scikit-plot!
from scikit-plot.
@reiinakano
Thanks a lot, that was a fast fix!
Thank you as well for developping this useful package, it saves a lot of time!
from scikit-plot.
Related Issues (20)
- Is this project still maintained? HOT 1
- add more argument pass through from plot_cumulative_gain to matplotlib
- Add numerical digit precision parameter HOT 1
- The True label displays abnormal HOT 2
- Add a Silhouette coefficient plot for `clusterer` module HOT 2
- Plot confusion matrix not from predictions but from actual confusion matrix HOT 1
- plot feature importances: how to get the feature names out of a pipeline?
- plot_pca_2d_projection, order of classes/labels is not preserved
- Adding class_names option to gain and lift plots
- Actively Developed? HOT 2
- add class prediction error plot
- Regarding the scikit-plot.metrics.plot_roc function HOT 1
- [BUG] Build status badge not rendering correctly in readme
- Bug: Failing to import Scikitplot fails due to ImportError HOT 4
- Adding a parameter to plot_confusion_matrix() to hide overlaid counts HOT 7
- MatplotlibDeprecationWarning: Passing one of 'on', 'true', 'off', 'false' as a boolean is deprecated
- Too many indices For Array HOT 4
- ValueError: Found input variables with inconsistent numbers of samples HOT 3
- add classes_to_plot option to plot_cumulative_gain HOT 3
- Is there a [problem in precision_recall_curve? HOT 1
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 scikit-plot.