casimac
Supervised multi-class/single-label classification with gradients.
Science Score: 51.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
-
○.zenodo.json file
-
✓DOI references
Found 8 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.1%) to scientific vocabulary
Keywords
machine-learning
Last synced: 7 months ago
·
JSON representation
·
Repository
Supervised multi-class/single-label classification with gradients.
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 3
Topics
machine-learning
Created about 6 years ago
· Last pushed about 2 years ago
Metadata Files
Readme
License
Citation
README.rst
**********************************************
CASIMAC: Calibrated Simplex-Mapping Classifier
**********************************************
.. image:: https://readthedocs.org/projects/casimac/badge/?version=latest
:target: https://casimac.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/casimac
:target: https://pypi.org/project/casimac/
:alt: PyPI - Project
.. image:: https://img.shields.io/badge/license-MIT-lightgrey
:target: https://github.com/RaoulHeese/casimac/blob/main/LICENSE
:alt: MIT License
.. image:: https://raw.githubusercontent.com/RaoulHeese/casimac/master/docs/source/_static/simplex.png
:align: center
This Python project provides a supervised multi-class classification algorithm with a focus on calibration, which allows the prediction of class labels and their probabilities including gradients with respect to features. The classifier is designed along the principles of an `scikit-learn `_ estimator.
The details of the algorithm have been published in `PLOS ONE `_ (preprint: `arXiv:2103.02926 `_).
Complete documentation of the code is available via ` `_. Example notebooks can be found in the `examples` directory.
**Installation**
Install the package via pip or clone this repository. In order to use pip, type:
.. code-block:: sh
$ pip install casimac
**Getting Started**
Use the ``CASIMAClassifier`` class to create a classifier object. This object provides a ``fit`` method for training and a ``predict`` method for the estimation of class labels. Furthermore, the ``predict_proba`` method can be used to predict class label probabilities.
Below is a short example.
.. code-block:: python
from casimac import CASIMAClassifier
import numpy as np
from sklearn.gaussian_process import GaussianProcessRegressor
import matplotlib.pyplot as plt
# Create toy data
N = 10
seed = 42
X = np.random.RandomState(seed).uniform(-10,10,N).reshape(-1,1)
y = np.zeros(X.size)
y[X[:,0]>0] = 1
# Classify
clf = CASIMAClassifier(GaussianProcessRegressor)
clf.fit(X, y)
# Predict
X_sample = np.linspace(-10,10,100).reshape(-1,1)
y_sample = clf.predict(X_sample)
p_sample = clf.predict_proba(X_sample)
# Plot result
plt.figure(figsize=(8,3))
plt.plot(X_sample,y_sample,label="class prediction")
plt.plot(X_sample,p_sample[:,1],label="class probability prediction")
plt.scatter(X,y,c='r',label="train data")
plt.xlabel("X")
plt.ylabel("label / probability")
plt.legend()
plt.show()
.. image:: https://raw.githubusercontent.com/RaoulHeese/casimac/master/docs/source/_static/plot.png
:align: center
📖 **Citation**
If you find this code useful, please consider citing `Calibrated simplex-mapping classification `_:
.. code-block::
@article{10.1371/journal.pone.0279876,
doi={10.1371/journal.pone.0279876},
author={Heese, Raoul and Schmid, Jochen and Walczak, Micha{\l} and Bortz, Michael},
journal={PLOS ONE},
publisher={Public Library of Science},
title={Calibrated simplex-mapping classification},
year={2023},
month={01},
volume={18},
url={https://doi.org/10.1371/journal.pone.0279876},
pages={1-26},
number={1}
}
**License**
This project is licensed under the MIT License - see the LICENSE file for details.
*This project is currently not under development and is not actively maintained.*
Owner
- Login: RaoulHeese
- Kind: user
- Repositories: 4
- Profile: https://github.com/RaoulHeese
Citation (CITATION.bib)
@article{10.1371/journal.pone.0279876,
doi={10.1371/journal.pone.0279876},
author={Heese, Raoul and Schmid, Jochen and Walczak, Micha{\l} and Bortz, Michael},
journal={PLOS ONE},
publisher={Public Library of Science},
title={Calibrated simplex-mapping classification},
year={2023},
month={01},
volume={18},
url={https://doi.org/10.1371/journal.pone.0279876},
pages={1-26},
number={1}
}
GitHub Events
Total
Last Year
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 63
- Total Committers: 4
- Avg Commits per committer: 15.75
- Development Distribution Score (DDS): 0.143
Top Committers
| Name | Commits | |
|---|---|---|
| RaoulHeese | r****e@g****m | 54 |
| RaoulHeese | 2****e@u****m | 4 |
| Martin Bubel | m****l@i****e | 4 |
| raalhe | 2****e@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 16 hours
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- MartinBubel (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 33 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
- Total maintainers: 1
pypi.org: casimac
Supervised multi-class/single-label classification with gradients
- Homepage: https://github.com/RaoulHeese/casimac
- Documentation: https://casimac.readthedocs.io/
- License: MIT
-
Latest release: 1.2.4
published about 3 years ago
Rankings
Dependent packages count: 6.6%
Downloads: 14.5%
Forks count: 19.6%
Average: 19.9%
Stargazers count: 28.2%
Dependent repos count: 30.6%
Maintainers (1)
Last synced:
8 months ago
Dependencies
docs/requirements.txt
pypi
- matplotlib *
- numpy *
- scikit-learn ==0.21.2
- scipy ==1.2.3
setup.py
pypi