CodAdapt
Adaptive coded-memory learning for tabular data, with a scikit-learn-compatible Python API.
CodAdapt is a machine-learning library for binary classification, multiclass classification, and single-target regression. It encodes numerical and categorical features and learns residual contributions through lookup memories. Preprocessing is learned during fitting and reused when making predictions.
Install
pip install codadapt
See the installation guide for local wheel installation and source-build requirements.
Quick start
Binary classification
from sklearn.datasets import load_breast_cancer
from codadapt import CodAdaptClassifier
X, y = load_breast_cancer(return_X_y=True)
model = CodAdaptClassifier(random_state=42)
model.fit(X, y)
predictions = model.predict(X)
probabilities = model.predict_proba(X)
Multiclass classification
The same classifier handles multiclass targets without a task parameter.
from sklearn.datasets import load_iris
from codadapt import CodAdaptClassifier
X, y = load_iris(return_X_y=True)
model = CodAdaptClassifier(random_state=42)
model.fit(X, y)
predictions = model.predict(X)
probabilities = model.predict_proba(X)
Probability column j corresponds to model.classes_[j].
Regression
from sklearn.datasets import load_diabetes
from codadapt import CodAdaptRegressor
X, y = load_diabetes(return_X_y=True)
model = CodAdaptRegressor(random_state=42)
model.fit(X, y)
predictions = model.predict(X)
These snippets demonstrate the interface using training rows. Evaluate predictive quality on separate validation and test data.
Highlights
- Adaptive coded-memory learning for numerical and categorical tabular features.
- Binary and multiclass classification through one estimator, plus a separate regressor.
- Preprocessing fitted on training data, with supported missing-value handling.
sample_weightfor both estimators and optionalclass_weight="balanced"for classification.- Familiar estimator methods, parameter inspection, cloning, and Pipeline integration.
- Model persistence and integrity-checked serving utilities.
API and scikit-learn integration
Use CodAdaptClassifier for single-label classification and CodAdaptRegressor
for single-target regression. Both accept random_state and provide fit,
predict, get_params, and set_params. Classifiers also provide predict_proba,
decision_function, and classes_ after fitting.
Dense numerical NumPy arrays and supported pandas DataFrames are accepted. Use DataFrames for mixed numerical and categorical columns; preserve the training feature schema when predicting. Arbitrary mixed-object NumPy arrays are outside the input contract.
The estimators can be cloned and used in scikit-learn pipelines. For parameter semantics, categorical inputs, validation, and sample weights, see the API reference.
Compatibility and source installation
The package declares Python >=3.10,<3.16. Available wheels and supported dependency
combinations vary by platform; see the
compatibility guide
for the exact runtime scope.
Training and feature encoding use Python/NumPy. Some wheels also include an optional C++ inference backend, with a Python fallback. Installing a native wheel does not enable automatic native execution on every platform; explicit backend selection is described in the native inference guide.
A compatible prebuilt wheel needs no compiler. Building the optional native extension from source requires a C++17 compiler and the build dependencies specified by the package. Follow the source installation instructions.
Persistence
After fitting a model, save and restore it with joblib:
import joblib
joblib.dump(model, "codadapt-model.joblib")
restored = joblib.load("codadapt-model.joblib") # Trusted files only
restored_predictions = restored.predict(X)
Load only artifacts from trusted sources and keep compatible package and dependency versions. Cross-version serialization compatibility is not guaranteed. See persistence and serving for export, integrity checks, and loading requirements.
Limitations
Predictive quality, training cost, inference time, and memory use depend on the dataset and configuration. CodAdapt does not claim universal superiority over other tabular learning methods.
class_weight="balanced" is optional and does not guarantee higher accuracy or
better-calibrated probabilities. Backend controls are separate from the public
estimator parameters. See the
limitations
and performance documentation.
Documentation
- API reference
- Installation
- Compatibility
- Persistence and serving
- Examples
- Performance
- Source repository
License
CodAdapt is created by Luca Lullo and released under the MIT License.
Author
Created by Luca Lullo.
Metadata
Release files for codadapt 2.1.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 |
|---|---|---|---|---|
| codadapt-2.1.0.tar.gz | 7.4 MB | With provenance | Details for codadapt-2.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codadapt-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for codadapt-2.1.0-py3-none-any.whl |
| codadapt-2.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details for codadapt-2.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
| codadapt-2.1.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for codadapt-2.1.0-cp312-cp312-win_amd64.whl |
Total release size: 7.8 MB
Release files / codadapt-2.1.0.tar.gz
| Download URL | codadapt-2.1.0.tar.gz |
|---|---|
| Size | 7.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc4d2e48f7805a3b65425f2327b5646aa1deb42491707d0fafedb9d464518028
|
|
BLAKE2b-256 checksum How to use checksums |
eb6faf840eb1affb0943deac24f4f618ccbf9584e9889cc3a203fdc127f43abd
|
| 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 Nov 1, 2026.
Transparency logRelease files / codadapt-2.1.0-py3-none-any.whl
| Download URL | codadapt-2.1.0-py3-none-any.whl |
|---|---|
| Size | 91.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a58603dc7d45c1752ed94630b294aa0791b57f03fb7d3f966b314e5153f9b6b3
|
|
BLAKE2b-256 checksum How to use checksums |
767b7d9bf5b2c0e41dd269fb84acf0302c1b19e4736c86ae8598bbf6c5bff4ba
|
| 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 Nov 1, 2026.
Transparency logRelease files / codadapt-2.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | codadapt-2.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 190.4 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a81446fd3de1a32e3836f38870188d124a2ee2cd885cfa0dd37eb11e9c95dadd
|
|
BLAKE2b-256 checksum How to use checksums |
74c347453c3a3833051403ec3d7e41d3d8f850964111062d22331ea8c9e6cd35
|
| 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 Nov 1, 2026.
Transparency logRelease files / codadapt-2.1.0-cp312-cp312-win_amd64.whl
| Download URL | codadapt-2.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 179.8 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bf361f9b61c1bcb8c06a5979fe493f3d01eb33746fdb2d3b99cdae7dbda8d6bd
|
|
BLAKE2b-256 checksum How to use checksums |
a626dac20b631233d692c022a19506d05bb6b8f786b93e742c70b1b5d81b2920
|
| 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 Nov 1, 2026.
Transparency logSecurity for codadapt 2.1.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
All 4 files in this release have been uploaded with provenance metadata.
Attestation for codadapt-2.1.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 Nov 1, 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.