classgraphic
Interactive classification diagnostic plots
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.5%) to scientific vocabulary
Repository
Interactive classification diagnostic plots
Basic Info
- Host: GitHub
- Owner: dionresearch
- License: mit
- Language: Python
- Default Branch: main
- Size: 1.28 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 5
- Releases: 1
Metadata Files
README.md
classgraphic
Interactive classification diagnostic plots for scikit-learn.

We classify things for the purpose of doing something to them. Any classification which does not assist manipulation is worse than useless. - Randolph S. Bourne, "Education and Living", The Century Co (April 1917)
Major features:
Plotly based tables for:
- classimbalancetable
- classification_table
- confusionmatrixtable
- describe (dataframe stats)
- prediction_table
- table
And the following charts:
- class_imbalance
- class_error
- det
- feature_importance
- missing
- precision_recall
- roc
- prediction_histogram
- threshold
For clustering: - Delauney triangulations - Voronoi tessalations
Try it
By trying it on binder, you'll see all the details and interactivity. The quickstart below has static images, but if you run these commands in a jupyter notebook, ipython or IDE you will be able to interact with them.
Quickstart
```python from classgraphic.essential import *
loading the data
df = px.data.iris()
let's see what kind of data we have
describe(df, transpose=True).show()

python
any missing?
missing(df)

python
features
X = df.drop(columns=["species", "species_id"])
target
y = df["species"]
Let's check our classes we will be training on and predicting
classimbalancetable(y, condition="all")

python
train / test split
Xtrain, Xtest, ytrain, ytest = traintestsplit( X, y, testsize=0.5, randomstate=random_state )
we want to see total count for each, default for bars is to be stacked, so that works
we could also pass to class_imbalance barmode="overlay" if we prefer
classimbalance(ytrain, y_test, condition="train,test")

python
model
model = LogisticRegression(maxiter=maxiter, randomstate=randomstate) model.fit(Xtrain, ytrain)
predictions
yscore = model.predictproba(Xtest) ypred = model.predict(X_test)
confusionmatrixtable(model, ytest, ypred).show()
classificationtable(model, ytest, ypred)


python
featureimportance(model, y, transpose=True)
```

This concludes the quickstart. There are many more visualizations and tables to explore.
See the notebooks and docs folders on github and the documentation
web site for more information.
Requirements
- Python 3.8 or later
- numpy
- pandas
- plotly>=5.0
- scikit-learn
- nbformat
Install
If you use conda, create an environment named classgraphic, then activate it:
in Linux:
source activate pilotIn Windows:
conda activate pilot
If you use another environment management create and activate your environment using the normal steps.
Then execute:
sh
python setup.py install
or for installing in development mode:
sh
python -m pip install -e . --no-build-isolation
or alternatively
sh
python setup.py develop
To install from github instead:
shell
pip install git+https://github.com/dionresearch/classgraphic
See also
- stemgraphic python package for visualization of data and text
- Hotelling one and two sample Hotelling T2 tests, T2 and f statistics and univariate and multivariate control charts and anomaly detection
Citation (CITATION.cff)
cff-version: 1.1.0
message: If you use this software, please cite it as below.
authors:
- family-names: Dion
given-names: Francois
title: ClassGraphic
abstract: "ClassGraphic implements interactive classification diagnostic plots"
version: 0.2.0
date-released: 2022-09-18
GitHub Events
Total
Last Year
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| fdion | f****n@d****m | 21 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 6
- Total pull requests: 4
- Average time to close issues: 1 day
- Average time to close pull requests: about 1 month
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fdion (6)
Pull Request Authors
- fdion (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 289 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
pypi.org: classgraphic
Interactive classification diagnostic plots
- Homepage: https://github.com/dionresearch/classgraphic
- Documentation: https://classgraphic.readthedocs.io/
- License: MIT license
-
Latest release: 0.3.1
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- numpy *
- pandas *
- plotly >=5.0
- scikit-learn *
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- peaceiris/actions-gh-pages v3 composite