Skip to main content

traauto: Advanced AutoML with Enhanced Track-Rail Algorithm

Overview

traauto is a comprehensive, research-grade AutoML library that builds upon the success of the original TRA Algorithm (tra-algorithm), extending the Track/Rail ensemble strategy with full automation, advanced feature engineering, meta-learning, dynamic model fusion, and explainable AI. This package is designed for practitioners and researchers who need both flexibility and state-of-the-art automation for classification or regression tasks, supporting modern datasets and robust analysis pipelines.

About TRA Algorithm (tra-algorithm)

The original TRA Algorithm is an innovative ensemble framework that routes data between specialized models ("tracks") using real-time signals, enabling adaptive, explainable, parallel processing for both classification and regression. Key features included:

  • Dynamic track switching & adaptive routing
  • Advanced signal-based decision logic
  • Track pruning and usage optimization
  • Robust visualization and reporting APIs
  • Full support for regression and classification tasks

For more details and usage of the original TRA Algorithm, see the tra-algorithm documentation.

About traauto

traauto takes the core concept of dynamic track-based ensembles and delivers a full AutoML pipeline with these major enhancements:

  • Automated Feature Engineering: Generation, selection, and transformation of features with adaptive regularization, interaction, transformation, and aggregation.
  • Meta-Learning & Model Selection: Suggests architectures and hyperparameters using dataset meta-features and Optuna-based optimization.
  • Smart Routing Engine: Intelligent per-record routing to specialized tracks, using meta-analytics, confidence, and feature specialization.
  • Dynamic Ensemble Fusion: Advanced fusion strategies (stacking, weighted voting, smart fusion) optimize overall predictions dynamically.
  • Regional Track Creation: Automated clustering to create regional/subtrack models for data specialization.
  • Explainability: Supports SHAP, LIME, and feature importances for interpretability of predictions and model behaviour.
  • Resource Monitoring and Adaptive Checkpoints: Tracks performance, memory usage, and provides checkpoint/resume capability.
  • System Health & Analysis: Rich system summaries, track evaluations, routing analytics, and report generation.
  • Project Persistence: Built-in checkpointing and reload via joblib for pipeline reproducibility.

Installation

Install from PyPI:

pip install traauto

Quick Start: Classification Example

from traauto import EnhancedTrackRailSystem, TRAConfig
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
import numpy as np

def test_classification():
    # Generate data with compatible parameters
    X, y = make_classification(
        n_samples=120,
        n_features=10,
        n_classes=3,
        n_informative=3,
        random_state=0
    )
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)

    config = TRAConfig(task_type="classification")
    tra = EnhancedTrackRailSystem(config=config)
    tra.fit(X_train, y_train)
    y_pred = tra.predict(X_test)

    assert len(y_pred) == len(y_test)
    print("Classification test passed.")
    metrics = tra.get_performance_metrics(X_test, y_test)
    print("Classification accuracy:", metrics.get("overall_accuracy", "N/A"))
    print("F1-score:", metrics.get("f1_score", "N/A"))

if __name__ == "__main__":
    test_classification()
    print("-" * 40)

Main Components and Capabilities

  • EnhancedTrackRailSystem: Main system class combining all automation and analysis engines.
  • TRAConfig: Configuration object for defining task type, feature engineering, meta-learning, resource constraints, and fusion strategies.
  • AutomatedFeatureEngineer: Generates, transforms, and selects features adaptively.
  • MetaLearningEngine: Analyzes dataset meta-features and applies hyperparameter optimization.
  • SmartRoutingEngine: Dynamically chooses the best model/track per input using auditing.
  • DynamicEnsembleFusion: Combines track outputs with weighted, voting, stacking, or smart fusion methods.
  • ExplainabilityEngine: Produces SHAP/LIME/feature importance explanations for model or record-level predictions.
  • Checkpointing: Safely saves and reloads full system state for reproducibility.

Algorithm Architecture

  1. Feature Engineering: The system automatically performs feature selection, interaction, transformation, and aggregation.
  2. Track/Model Training: Multiple tracks (ensembles) are created for global and regional data distributions. Each receives optimized, specialized training.
  3. Meta-Learning: Dataset statistics are extracted to suggest and tune model architectures and fusion strategies.
  4. Routing & Prediction: For each new record, automl-tra routes data to the most suitable track/model using feature-based analytics and confidence.
  5. Ensemble Fusion: Track predictions are combined using quality-weighted or stacking methods, adapting to dataset and model performance.
  6. Explainability: Explanations are generated on-demand for individual predictions, tracks, or overall system behaviour.
  7. Analysis & Reporting: System health, track statistics, and rich routing analysis are readily available.
  8. Project Persistence: Full checkpoint and reload capability for workflows and reproducibility.

Advanced Features

  • Automated Clustering for Regional Tracks: High quality clustering (KMeans, DBSCAN) creates specialized regional tracks for improved accuracy.
  • Adaptive Signal and Routing Creation: Meta-learned signals guide the routing engine to maximize predictive performance.
  • Explainable AI Support: SHAP, LIME, and fallback importances provide interpretability for output and decisions.
  • System Health Checks and Monitoring: Monitor latency, memory, stability, and prediction efficiency.
  • Checkpoint/Restore: Robust project checkpointing for safe experiment pause/resume or deployment.
  • Full Support for Imbalanced Data: Optional SMOTE integration and automatic class weight generation.

Comparison: tra-algorithm vs automl-tra

Feature tra-algorithm traauto (this package)
Ensemble Track Routing Dynamic track switching Advanced, meta-learned, per-record
Signal Evaluation Adaptive, parallel signals Meta-driven, smart routing engine
AutoML Pipeline Manual feature prep Automated feature engineering, NAS
Meta-Learning & Architecture Static models Automated model suggestion & optimization
Feature Engineering Basic (scikit-learn) Advanced, regularized & aggregated
Dynamic Ensemble Fusion Voting/weighted fusion Smart fusion, stacking, advanced fusion
Explainable AI Track-level Track-level & record-level (SHAP/LIME)
Checkpointing & Recovery Yes
System Health/Analysis Basic logging/reporting Full system and track analytics
Task Support Classification/Regression Both, with more robust architecture

Requirements

  • Python >= 3.7
  • numpy, pandas, scikit-learn, joblib, psutil
  • Optional (for full feature set): optuna, torch, xgboost, lightgbm, shap, lime, imbalanced-learn

Support & Issues

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use automl-tra in your research, please cite:

Metadata

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

Built distribution (wheel)

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

Total release size: 69.5 kB

Release files / traauto-0.1.0.tar.gz

Download URL traauto-0.1.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bec1dfa895a1b69ae09444fb8cd7f0d9b7f0867589ecf5533202ac301ae13792
BLAKE2b-256 checksum
How to use checksums
9faa2659a08510db2f582699c98689e3fe0b6992693991d2a48ffcd2b3d90254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

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

Download URL traauto-0.1.0-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f2932d8c16bbf8d562eb0c3a20dd00f1c80fe720b18b69089b5641434a8e993
BLAKE2b-256 checksum
How to use checksums
5da4e3276fe97ad327d14831219690494929edf7d89210f207102eb16e776274
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for traauto 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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