calfcv
A Python implementation of the Coarse Approximation Linear Function (CALF) algorithm for binomial classification and feature selection. This package provides binary classification with parsimonious and interpretable feature selection.
Features
- Integer Weighting: Assigns integer weights for interpretable linear models.
- Cross-Validation: Built in cross validation for automated hyperparameter tuning and feature selection.
- Sparse Data Support: Processes high-dimensional
scipy.sparsematrices with stable memory usage. - Multiclass and Multilabel: Supports Scikit-Learn
OneVsRestClassifier. - Scikit-Learn Compatibility: Plugs directly into
Pipeline,GridSearchCV, and standard estimator workflows.
Installation
Use pip to install calfcv:
pip install calfcv
Quick Start Example
Make a classification problem and train the classifier:
from calfcv import CalfCV
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
# Make a classification problem
seed = 42
X, y = make_classification(
n_samples=30,
n_features=5,
n_informative=2,
n_redundant=2,
n_classes=2,
random_state=seed
)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=seed)
# Train the classifier
cls = CalfCV().fit(X_train, y_train)
# Get the score on unseen data
print(cls.score(X_test, y_test))
# Output: 0.875
Citation
If you use this package in your research, please cite:
Jeffries, C.D., Ford, J.R., Tilson, J.L. et al. A greedy regression algorithm with coarse weights offers novel advantages. Sci Rep 12, 5440 (2022). https://doi.org/10.1038/s41598-022-09415-2
License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
Authors
- CALF Algorithm: Clark D. Jeffries, John R. Ford, Jeffrey L. Tilson, Diana O. Perkins, Darius M. Bost, Dayne L. Filer, and Kirk C. Wilhelmsen
- CalfCV Python Package (
calfcv): Rolf Carlson (rolf@hrolfrc.com)
Metadata
Release files for calfcv 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calfcv-0.4.0.tar.gz | 13.7 kB | With provenance | Details for calfcv-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calfcv-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for calfcv-0.4.0-py3-none-any.whl |
Total release size: 29.2 kB
Release files / calfcv-0.4.0.tar.gz
| Download URL | calfcv-0.4.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95db8d953174f0e29f5399f429db7a919460b8e82372ff76a3dac08b38866c12
|
|
BLAKE2b-256 checksum How to use checksums |
7e1fa88eb3156ff29d95333cd99a0bd696ef9a1b326f7e9e8e0ff64fe3109ca1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / calfcv-0.4.0-py3-none-any.whl
| Download URL | calfcv-0.4.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4eadccf71b32ebd66debd222a66a59b566cf819909c2762d97569f275dd32a15
|
|
BLAKE2b-256 checksum How to use checksums |
c57e4bbd23431e8bdb72c1e9395676e698306b886aff104b05216518a899b292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logSecurity for calfcv 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for calfcv-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.