Skip to main content

pydaltoolbox

PyPI version Python versions License: MIT

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

Install the latest release from PyPI:

pip install pydaltoolbox

Beta: the current release (0.1.0) is in a testing phase this month, on the way to the 1.0.0 launch. Feedback and issues are very welcome.

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

Beta (0.1.0) — the v1 foundation is complete and in testing toward 1.0.0. 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.3.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.3.0
File Size Uploaded Provenance Actions
pydaltoolbox-0.3.0.tar.gz 33.0 kB Without provenance Details for pydaltoolbox-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 84.5 kB

Release files / pydaltoolbox-0.3.0.tar.gz

Download URL pydaltoolbox-0.3.0.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
04d5d82c3dd675440e4cbf4c0ca65d99d1434b5c4900b4bd7c9fcec3dc79c8c5
BLAKE2b-256 checksum
How to use checksums
341560183a36829b726dc894b74b4da53cece02b932d77091a290adf5260884f
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.3.0-py3-none-any.whl

Download URL pydaltoolbox-0.3.0-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4c450877421dfd3f515eaede6ad2f75efe041bfa2bc02f8cf0f355bca827181
BLAKE2b-256 checksum
How to use checksums
15eb722bbb90e4534b1b28c684b78492c08c419791eab4111a5dea4d33a4d612
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.3.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