Skip to main content

pydaltoolbox

Python port of the R DAL Toolbox — leveraging Experiment Lines for Data Analytics.

pydaltoolbox organizes data analytics workflows (preprocessing, modeling, evaluation, tuning, extensibility) around a consistent Experiment Line style API. Its value is not reimplementing classic algorithms — it reuses scikit-learn, numpy and pandas — but a rigid, extensible interface that wraps them with a uniform fit / action / evaluate contract. Building a new method means subclassing a base and implementing two or three methods; sampling, evaluation and tuning come for free.

It is the foundation of the DAL Python family that will also include pytspredit (time series prediction) and pyharbinger (time series event detection).


Installation

The package is in early development. A stable PyPI release is planned.

Once published, the stable version will be available on PyPI:

pip install pydaltoolbox

The development version is available on GitHub:

pip install git+https://github.com/cefet-rj-dal/pydaltoolbox.git

For a local, editable clone (for contributing or running the examples):

git clone https://github.com/cefet-rj-dal/pydaltoolbox.git
cd pydaltoolbox
pip install -e ".[dev]"
pytest

First experiment

import pydaltoolbox as dal

iris = dal.datasets.iris()
slevels = list(iris["Species"].cat.categories)

split = dal.SampleRandom(seed=42).train_test(iris)
train, test = split["train"], split["test"]

model = dal.ClaDtree("Species", slevels, random_state=42).fit(train)

pred = model.predict(test.drop(columns="Species"))   # pass only the features
ev = model.evaluate(test["Species"], pred)
print(ev["metrics"])

Documentation

  • Processed examples — notebooks executed end to end, with real output embedded (the "processed documentation", analogous to the R package's examples/).
  • develop/planejamento.md — the migration roadmap (phases, scope, status).
  • develop/deploy.md — step-by-step guide to publish the package to PyPI.

The example sources live under notebooks/ (jupytext Markdown) and are rendered into examples/ by:

pip install -e ".[docs]"
python tools/build_examples.py

Status

Alpha — the v1 foundation is complete. Implemented:

  • Core Experiment Line: DalBase, DalTransform, DalLearner, Predictor, set_params, and the adjust_* helpers.
  • Sampling: SampleRandom, SampleStratified (train_test, k_fold), train_test_from_folds.
  • Classification: Classification base + ClaDtree, ClaRpart, ClaKnn, ClaNb, ClaRf, ClaBagging, ClaBoosting, ClaSvm, ClaMlp, ClaGlm, ClaMultinom, ClaGlmnet, ClaMajority.
  • Regression: Regression base + RegLm, RegDtree, RegKnn, RegRf, RegSvm, RegMlp.
  • Clustering: Clusterer base + metrics + ClusterKmeans, ClusterDbscan, ClusterGmm, ClusterHclust.
  • Transformations: MinMax, ZScore, NaRemoval, ImputationSimple, OutliersBoxplot, OutliersGaussian, CategMapping, DtPca, feature selection (Corr, Lasso, InfoGain, Stepwise), balancing (SampleBalance, BalSubsampling, BalOversampling), and curvature helpers.
  • Tuning: DalTune base + ClaTune, RegTune, CluTune.
  • Autoencoder bases: AutoencBaseE, AutoencBaseEd (identity, for extension).
  • Reference datasets: datasets.iris(), datasets.diabetes(), datasets.boston().

Wrappers are thin adapters over scikit-learn / numpy / pandas, each reproducing the R backend's default behavior (e.g. SVM standardizes inputs like e1071, trees pre-prune like tree/rpart). See develop/planejamento.md for the roadmap and what is deferred to later versions (xgboost, k-medoids, fuzzy c-means, pattern mining, graphics).


License

MIT

Metadata

Release files for pydaltoolbox 0.1.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 pydaltoolbox 0.1.0
File Size Uploaded Provenance Actions
pydaltoolbox-0.1.0.tar.gz 29.5 kB Without provenance Details for pydaltoolbox-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 76.0 kB

Release files / pydaltoolbox-0.1.0.tar.gz

Download URL pydaltoolbox-0.1.0.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ae9eb409d28f7ef386273b7f63a82b229234b471867bc3d50a19a0a01388c8ef
BLAKE2b-256 checksum
How to use checksums
58720b7b97232178dd76ff9e2d0af2eda436b672a33e9cf1f32f4233a278d893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / pydaltoolbox-0.1.0-py3-none-any.whl

Download URL pydaltoolbox-0.1.0-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17c590d2afd0fd766059ded14edb9a93d082f6536c429a3c21b8eb68ffbf598d
BLAKE2b-256 checksum
How to use checksums
21a2d1810d49fba17f0f4ab813a3e83fd884067293f31013eb4468ac133367e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Security for pydaltoolbox 0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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