Skip to main content

CodAdapt

PyPI version

Adaptive coded-memory learning for tabular data, with a scikit-learn-compatible Python API.

Why CodAdapt?

CodAdapt learns residual contributions through lookup memories for binary classification, multiclass classification and single-target regression. Numerical and categorical inputs are encoded during fitting and the learned preprocessing is reused for predictions. It supports dense numerical arrays and mixed pandas DataFrames.

Project status

CodAdapt provides combined classifier outputs, optional snapshot compression and prepared immutable inputs for repeated requests. The underlying predictive learner is unchanged. Historical competitive measurements and current technical measurements are reported separately; no new predictive superiority is claimed. See the release notes.

Install

python -m pip install codadapt

The badge shows the latest published PyPI version. The command installs the latest release compatible with the active Python environment. To install the exact source checkout instead, run python -m pip install . from its root.

The current source requires Python 3.12 or later and builds a pure-Python wheel. The C++ inference backend is not included or built by this release. Users who require the previously supported native backend or Python 3.10/3.11 should retain a compatible 2.1.0 distribution. See the migration notes and installation guide.

Quick start

from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from codadapt import CodAdaptClassifier

X, y = load_breast_cancer(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42, stratify=y
)
model = CodAdaptClassifier(random_state=42).fit(X_train, y_train)
print("Test accuracy:", model.score(X_test, y_test))

The classifier also supports multiclass targets. For regression, use CodAdaptRegressor with a numerical target. See usage and examples. This example demonstrates the API, not the benchmark protocol.

Highlights

  • Binary and multiclass classification; single-target regression.
  • Automatic numerical/categorical encoding and supported missing-value handling.
  • scikit-learn-compatible estimators, cloning and pipelines.
  • Sample weights and optional balanced class weights.
  • Combined classifier scores, probabilities and labels (predict_all).
  • Prepared immutable-input sessions (prepare_inference) for repeated requests.
  • Optional compressed, integrity-checked snapshots and trusted model persistence; producer-bound serving utilities.

Benchmarks

Scope Evidence
Competitive evidence 2.1.0 vs six fixed baseline configurations; 14 development origins.
Coverage 97 of 98 estimator/dataset jobs measured; 83 paired comparisons, one missing.
Technical evidence 2.2.0 combined outputs, prepared inputs and snapshot compression; separate observations.
Reproducibility Per-dataset source and evidence guides, aggregate verification and figure regeneration; a separate historical fold-replay recipe is available.

The benchmark overview links predictive quality, computational costs, complete figures, methodology, failures and numerical data. The two evidence scopes must not be combined into a new ranking. See the reproducibility matrix for exact coverage and missing inputs.

When to use it

Use it when coded-memory learning and measured quality-resource trade-offs suit the workload. The development panel includes favorable loss/cost observations on Danish occupancy, Concrete and Edge task execution times; the separate technical panel records reduced combined-output time, prepared-request time and serialized size in tested cases.

When to consider alternatives

Consider alternatives when the primary objective is predictive quality on the evaluated multiclass workloads or when strict recall/FPR or deployment requirements are not satisfied. The six baselines often achieve better primary scores; inconclusive results are not equivalence.

Limitations

  • No universal predictive, timing or memory advantage is established.
  • No Holm-confirmed primary superiority or independent Pareto certification; C60 is not qualified.
  • A smaller snapshot does not imply lower loaded RAM; compression may increase loading cost.
  • Prepared inputs incur setup and retained model/input memory; regression combined requests can add overhead.
  • Arbitrary mixed-object NumPy arrays, broader runtime profiles and cross-version persistence are outside the verified contract.

Documentation

License

CodAdapt is created by Luca Lullo. Its original components are released under the MIT License, Copyright (c) 2026 Luca Lullo. Third-party components retain their licenses; see the third-party notices.

Author

Created by Luca Lullo.

Metadata

Release files for codadapt 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codadapt 2.2.0
File Size Uploaded Provenance Actions
codadapt-2.2.0.tar.gz 474.3 kB With provenance Details for codadapt-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codadapt 2.2.0
File Interpreter ABI Platform Actions
codadapt-2.2.0-py3-none-any.whl Python 3 none any Details for codadapt-2.2.0-py3-none-any.whl

Total release size: 709.7 kB

Release files / codadapt-2.2.0.tar.gz

Download URL codadapt-2.2.0.tar.gz
Size 474.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1215b4385a5142b992dcf478a4866d15c86bee51ca9fbfb1e29040fd69e8004d
BLAKE2b-256 checksum
How to use checksums
318685dee4ca3c28ef9247df1d68b49f347ac8042c33e311b93da946fc85b73f
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 25, 2026.

Transparency log

Release files / codadapt-2.2.0-py3-none-any.whl

Download URL codadapt-2.2.0-py3-none-any.whl
Size 235.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e0955905366d3dc7fcb0c06a868981e7ecb35e1d931aac6b5aa6a1352ca07de
BLAKE2b-256 checksum
How to use checksums
d951488d20ed1f7fb1f1eedfa9f4185f019ea6fe2542aae97edc7598ec99a0b6
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 25, 2026.

Transparency log

Security for codadapt 2.2.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.

Select from 2 files

Attestation for codadapt-2.2.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 25, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page