Structured AutoML Pipeline with Intelligent Dataset Profiling
Project description
Octolearn ๐
Structured AutoML Pipeline with Intelligent Dataset Profiling
Octolearn generates professional-grade intelligence dossiers on your datasets automatically. In under 1 second, you get:
- ๐ Risk Score (0-100 data quality assessment)
- ๐ Feature Importance (baseline model + SHAP analysis)
- ๐ง Preprocessing Strategy (imputation, encoding, scaling recommendations)
- ๐ Visual Analysis (distributions, correlations, SHAP plots)
- ๐ก Strategic Recommendations (machine learning insights)
- ๐ Professional PDF Report (ready for stakeholders)
No code. No notebooks. Just intelligence.
โก Quick Start
Installation
pip install octolearn
Basic Usage
from octolearn import AutoML
from sklearn.datasets import load_iris
# Load your dataset
data = load_iris(as_frame=True)
X, y = data.data, data.target
# User-driven preprocessing: override imputer, encoder, scaler, and ID columns
user_params = {
'imputer_strategy': {'numeric': 'median', 'categorical': 'mode'},
'encoder_strategy': {'ordinal_cols': ['petal length (cm)'], 'bool_cols': ['sex']},
'scaler': 'standard',
'id_columns': ['sample_id']
}
# Initialize and fit with user params
automl = AutoML(**user_params)
automl.fit(X, y)
# Generate comprehensive report (modern black/red PDF)
pdf_file = automl.generate_report()
print(f"Report saved: {pdf_file}")
# Output: octolearn_report_<hash>.pdf
# All trained models are saved in trained_models/ and tracked in the registry
Access Individual Analyses
# Get dataset risk score
risk = automl.get_risk_score()
print(f"Risk Score: {risk['score']}/100")
print(f"Category: {risk['category']}")
# Get feature importance
importance = automl.get_feature_importance()
for feature, score in list(importance.items())[:5]:
print(f"{feature}: {score:.4f}")
# Get preprocessing suggestions
suggestions = automl.get_preprocessing_suggestions()
for strategy, recs in suggestions.items():
print(f"{strategy}: {recs}")
๐ฏ Features
1. Dataset Intelligence (16 Metrics)
- Row/column count
- Feature type detection (numeric, categorical, datetime)
- Missing value analysis
- Duplicate detection
- Cardinality assessment
- Skewness detection
- Task type auto-detection
2. Risk Scoring (0-100)
Comprehensive data quality assessment including:
- Missing data impact (0-20 points)
- Duplicate rows (0-15 points)
- Class imbalance (0-15 points)
- Feature skewness (0-10 points)
- Constant columns (0-10 points)
- High cardinality features (0-10 points)
- Feature-to-sample ratio (0-10 points)
- Sample size penalty (0-5 points)
Risk Categories:
- โ 0-30: Low Risk
- โ ๏ธ 31-60: Moderate Risk
- โ 61-100: High Risk
3. Preprocessing Recommendations
Auto-generated strategy for:
- Missing Values: Mean, median, KNN, or iterative imputation
- Categorical Encoding: One-Hot, Ordinal, or Target Encoding
- Feature Scaling: StandardScaler vs RobustScaler vs MinMaxScaler
- Feature Engineering: Polynomial features, interactions, temporal features
- Column Actions: Removal of constants, cardinality handling
4. Feature Importance
- Baseline Model: Fast Random Forest (~150ms)
- SHAP Analysis: TreeExplainer Shapley values
- Ranking: Top features identified automatically
5. Visual Analysis
6 professional visualizations embedded in PDF:
- Feature distributions (histograms with KDE)
- Correlation heatmap
- SHAP feature importance bar chart
6. Professional Reports
177KB PDF with:
- Color-coded risk assessment
- Executive summary
- Detailed diagnostics
- Visual analysis
- Actionable recommendations
- Professional formatting
๐ Example Output
DATASET PROFILE:
Rows: 150
Columns: 4
Task Type: classification
Hash: 8145f023f195
RISK SCORE: 10/100 (Low Risk)
Risk Factors:
โข 0.7% duplicate rows
โข Features/samples ratio: 0.03
FEATURE IMPORTANCE (Top 3):
1. petal length (cm): 0.4442
2. petal width (cm): 0.4181
3. sepal length (cm): 0.1099
PREPROCESSING SUGGESTIONS:
Missing Values: No missing values detected
Categorical Encoding: petal length (cm): Ordinal Encoding, sex: Label Encoding (0/1), others: One-Hot Encoding
Scaling: StandardScaler applied
Feature Engineering: Consider polynomial features
All model files are saved in trained_models/ and tracked in the registry.
PDF and all plots use a modern black background with red accents and modern font.
๐ฌ API Reference
AutoML()
Main orchestrator class.
Methods
fit(X, y)
Train profiler on dataset.
- Parameters: X (DataFrame), y (Series or array)
- Returns: self
generate_report()
Create comprehensive PDF report.
- Returns: filename (str)
- Output: Saves PDF with hash-based name
get_risk_score()
Get data quality assessment without full report.
- Returns:
{"score": int, "category": str, "factors": dict}
get_preprocessing_suggestions()
Get preprocessing strategy without full report.
- Returns: dict with 5 recommendation categories
get_feature_importance()
Get baseline feature importance without full report.
- Returns: dict of
{feature: score}
report()
Get raw profile dataclass.
- Returns: DatasetProfile
๐ Architecture
Octolearn ๐ โ The Ultimate User-Driven AutoML & Data Intelligence Suite
Production-Ready, Fully User-Param Driven, Transparent, and Extensible AutoML for Real-World Data Science
Octolearn generates professional-grade intelligence dossiers on your datasets automatically. In under 1 second, you get:
- Full user control at every step โ All preprocessing, modeling, and evaluation is user-param driven, with sensible defaults and full override capability.
- Professional, modern PDF reports โ Black background, red accents, modern font, and a model benchmarks/results table with all metrics and parameters.
- Robust model registry โ Every trained model is saved, versioned, and tracked with full metadata in
trained_models/and the registry. - Transparent, modular architecture โ Every phase is accessible, extensible, and documented. You can access, override, or extend any step.
- Lightning-fast, production-grade outputs โ Full pipeline (profiling, cleaning, modeling, reporting) in under 1 second for most datasets.
- Zero configuration, but infinite customization โ Works out of the box, but you can control every detail.
No code. No notebooks. Just intelligence.
๐ What is Octolearn?
Octolearn is a next-generation AutoML and data intelligence library that gives you:
- Full user control at every step โ All preprocessing, modeling, and evaluation is user-param driven, with sensible defaults and full override capability.
- Professional, modern PDF reports โ Black background, red accents, modern font, and a model benchmarks/results table with all metrics and parameters.
- Robust model registry โ Every trained model is saved, versioned, and tracked with full metadata in
trained_models/and the registry. - Transparent, modular architecture โ Every phase is accessible, extensible, and documented. You can access, override, or extend any step.
- Lightning-fast, production-grade outputs โ Full pipeline (profiling, cleaning, modeling, reporting) in under 1 second for most datasets.
- Zero configuration, but infinite customization โ Works out of the box, but you can control every detail.
๐ก Why Octolearn?
- User-param driven: You control imputation, encoding, scaling, ID columns, model selection, evaluation metric, and more.
- No data leakage: Specify ID columns and they are never used in modeling or predictions.
- Model registry: All models are saved, versioned, and tracked for reproducibility and deployment.
- Professional reporting: PDF reports are modern, beautiful, and include a full model benchmarks/results table.
- API-first, notebook-friendly: Use as a script, in notebooks, or as a backend for your own tools.
- Extensible: Add your own models, metrics, or reporting sections easily.
- Transparent: Access every intermediate result, log, and artifact.
- Production-ready: Used in real-world projects, with robust error handling and logging.
โก Quick Start
Installation
pip install octolearn
Minimal Usage
from octolearn import AutoML
import pandas as pd
df = pd.read_csv('your_data.csv')
X = df.drop('target', axis=1)
y = df['target']
# All defaults, full pipeline
automl = AutoML()
automl.fit(X, y)
pdf = automl.generate_report()
print(f"Report: {pdf}")
๐ ๏ธ Full User-Param Control
automl = AutoML(
imputer_strategy={"numeric": "median", "categorical": "mode"},
encoder_strategy={"ordinal_cols": ["grade"], "default": "ohe"},
scaler="minmax",
id_columns=["id", "customer_id"],
train_models=True,
use_registry=True,
n_models=3,
evaluation_metric="f1",
parallel_processing=True
)
automl.fit(X, y)
results = automl.train_auto_models()
pdf = automl.generate_report()
- Dataset Profiling:
profiling/data_profiler.pyperforms automatic type detection (numeric, categorical, datetime), missing-value summaries, duplicate detection, skewness and constant-column checks, high-cardinality detection, and produces a stable dataset hash.
๐ฅ Key Features & Power
- User-param driven preprocessing: Imputer, encoder, scaler, and ID columns are all user-overridable at any point.
- ID column handling: Any columns listed in
id_columnsare never used for modeling or predictions, but are preserved for merging and reference. - Model registry: Every trained model is saved in
trained_models/and tracked in the registry with full metadata (parameters, metrics, version, hash). - Model benchmarks/results table: PDF report includes a table of all trained models, their parameters, and all metrics, with the best model at the top (by your chosen metric).
- User-param driven evaluation metric: Select the metric (e.g., F1, RMSE, accuracy, etc.) for best model selection and benchmarking.
- Professional PDF reporting: Black background, red accents, modern font, and full transparency of all results.
- Access at every point: Access cleaned data, profile, outlier analysis, feature interactions, cleaning log, all trained models, best model, and model benchmarks at any time.
- Extensible and modular: Add your own models, metrics, or reporting sections with minimal code changes.
- API-first: All phases and results are accessible via the API.
- Production-grade error handling and logging: Robust, clear, and debug-friendly.
๐ Example Output
DATASET PROFILE:
Rows: 150
Columns: 4
Task Type: classification
Hash: 8145f023f195
RISK SCORE: 10/100 (Low Risk)
Risk Factors:
โข 0.7% duplicate rows
โข Features/samples ratio: 0.03
FEATURE IMPORTANCE (Top 3):
1. petal length (cm): 0.4442
2. petal width (cm): 0.4181
3. sepal length (cm): 0.1099
PREPROCESSING SUGGESTIONS:
Missing Values: No missing values detected
Categorical Encoding: petal length (cm): Ordinal Encoding, sex: Label Encoding (0/1), others: One-Hot Encoding
Scaling: StandardScaler applied
Feature Engineering: Consider polynomial features
All model files are saved in trained_models/ and tracked in the registry.
PDF and all plots use a modern black background with red accents and modern font.
๐งโ๐ป Advanced Usage & API
Data Access at Any Point
automl.X_โ Cleaned features (IDs dropped for modeling, but available for merging)automl.y_โ Cleaned targetautoml.profile_โ Full dataset profile (metrics, types, etc.)automl.outlier_results_โ Outlier analysisautoml.interaction_results_โ Feature interaction analysisautoml.cleaning_log_โ Step-by-step cleaning logautoml.trained_models_โ All trained model objectsautoml.best_model_โ Best model objectautoml.model_benchmarks_โ List of all model results/benchmarks
API Reference
fit(X, y, ...)โ Run the full pipeline with user-param overridesgenerate_report()โ Create a professional PDF reporttrain_auto_models(evaluation_metric=...)โ Train all models and select best by your metricget_risk_score()โ Get risk score and factorsget_preprocessing_suggestions()โ Get preprocessing planget_feature_importance()โ Get feature rankingget_trained_models()โ Dict of all trained modelsget_best_model()โ Best model objectreport()โ Get the full dataset profile
๐ Architecture & Extensibility
octolearn/
โโโ core.py โ Main AutoML class
โโโ config.py โ Configuration
โโโ profiling/
โ โโโ data_profiler.py โ Dataset analysis (16 metrics)
โโโ experiments/
โ โโโ risk_scorer.py โ Risk assessment (0-100)
โ โโโ preprocessing_suggester.py โ Preprocessing strategy
โ โโโ baseline_importance.py โ Feature ranking
โ โโโ plot_generator.py โ Visualization + SHAP
โ โโโ recommendation_engine.py โ Strategic insights
โ โโโ report_generator.py โ PDF factory
โโโ feature/ โ Feature engineering & selection
โโโ models/ โ Model training, registry, selection
โโโ optimization/ โ Optimization & distributed support
โโโ evaluation/ โ Metrics & evaluation
โโโ utils/ โ Logging, helpers, error handling
๐ Power Features & Philosophy
- User-param driven at every step: Override any phase, any time.
- No data leakage: ID columns are never used for modeling or predictions.
- Model registry: All models are saved, versioned, and tracked.
- Professional, modern PDF reporting: Black background, red accents, modern font, and a model benchmarks/results table.
- API-first, notebook-friendly, and scriptable: Use anywhere.
- Extensible and modular: Add your own models, metrics, or reporting sections.
- Transparent and debuggable: Access every intermediate result, log, and artifact.
- Production-ready: Robust error handling, logging, and reproducibility.
โก Performance
| Task | Time |
|---|---|
| Profile dataset | ~50ms |
| Calculate risk score | ~30ms |
| Generate suggestions | ~20ms |
| Train baseline model | ~150ms |
| Create visualizations | ~200ms |
| Generate PDF | ~100ms |
| TOTAL | ~550ms |
๐ Requirements
- Python 3.8+
- pandas โฅ 1.0.0
- numpy โฅ 1.19.0
- scikit-learn โฅ 0.24.0
- reportlab โฅ 3.6.0
- matplotlib โฅ 3.3.0
- seaborn โฅ 0.11.0
- shap โฅ 0.40.0
๐ Roadmap
- User-param driven preprocessing (imputer, encoder, scaler, ID columns)
- Robust model saving and registry
- Modern black/red PDF/visuals
- Model benchmarks/results table in PDF
- User-param driven evaluation metric
- Full API and data access at every point
- Concise, up-to-date documentation
- Outlier detection & visualization (coming soon)
- Feature interaction analysis (coming soon)
- Ensemble model selection (coming soon)
- MLflow integration (coming soon)
๐งช Testing
Run Tests
# Basic test
python test_octolearn.py
# Validation test
python validation.py
# Interactive notebook
jupyter notebook octolearn_demo.ipynb
Example Notebooks
octolearn_demo.ipynb: Interactive feature showcasenotebooks/test_octolearn_full.ipynb: Full pipeline test
๐ License
MIT License - see LICENSE file for details.
๐ค Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Commit changes
- Push to branch
- Open a Pull Request
๐ Support
Issues or Questions?
- Check documentation in ARCHITECTURE.md
- Review octolearn_demo.ipynb
- Open an issue on GitHub
๐ Philosophy
"Build the skeleton first. Then make it breathe."
Octolearn follows modular, automated, and professional principles:
- โ Modular Architecture - Each component independent
- โ Automation First - Recommendations, not questions
- โ Professional Quality - Production-ready outputs
- โ Reproducible Results - Hash-based naming
- โ Zero Configuration - Works out of the box
- โ User-Param Driven - Full control at every step
Made with โ and ๐ Logic.
- Risk Scoring:
experiments/risk_scorer.pycomputes a 0โ100 data quality risk score and returns contributing factors and a categorical label (Low / Moderate / High). - Preprocessing Suggestions:
experiments/preprocessing_suggester.pygenerates actionable strategies for imputation, encoding, scaling, cardinality handling, and column-specific actions. - Baseline Feature Importance:
experiments/baseline_importance.pytrains a fast Random Forest baseline to produce feature importances. - Explainability (SHAP):
experiments/plot_generator.pyintegrates SHAPTreeExplainerto produce SHAP summary plots and an importance bar chart for tree-based models. - Visual Diagnostics:
experiments/plot_generator.pycreates per-feature distribution plots, correlation heatmaps, and saves PNG artifacts (non-interactiveAggbackend supported). - Automated PDF Report:
experiments/report_generator.pycomposes a professional PDF dossier that embeds executive summary, risk banner, preprocessing suggestions, baseline importance, and visual diagnostics. - Recommendation Engine:
experiments/recommendation_engine.pysynthesizes profiling and model signals into concise, prioritized recommendations. - Core API / Orchestration:
core.pyexposes the high-levelAutoMLclass with methodsfit(X, y),generate_report(),get_risk_score(),get_preprocessing_suggestions(),get_feature_importance(), andreport()(raw profile). - Model & Optimization Utilities:
models/(selector & registry) andoptimization/optimizer.pyprovide foundations for model selection and future HPO workflows. - Preprocessing Pipeline Builder:
preprocessing/pipeline_builder.pyoffers utilities to construct reproducible sklearn-compatible pipelines from suggested strategies. - Feature Engineering & Selection:
feature/feature_engineer.pyandfeature/feature_selector.pyinclude initial helpers for transformations and automatic selection heuristics. - Evaluation & Metrics:
evaluation/metrics.pycontains common evaluation helpers used by experiments and baseline checks. - Tracking & Utilities:
experiments/tracker.pyplusutils/helpers.pyprovide lightweight run-tracking, reproducibility helpers, and I/O utilities. - Fonts & Assets:
fonts/contains font assets used when rendering the PDF reports for consistent professional typography.
These components are designed to work together end-to-end: run AutoML().fit(X,y) to create a DatasetProfile, inspect suggestions and risks via the API, and call generate_report() to produce a stakeholder-ready PDF report and visual artifacts.
โก Performance
| Task | Time |
|---|---|
| Profile dataset | ~50ms |
| Calculate risk score | ~30ms |
| Generate suggestions | ~20ms |
| Train baseline model | ~150ms |
| Create visualizations | ~200ms |
| Generate PDF | ~100ms |
| TOTAL | ~550ms |
๐ Requirements
- Python 3.8+
- pandas โฅ 1.0.0
- numpy โฅ 1.19.0
- scikit-learn โฅ 0.24.0
- reportlab โฅ 3.6.0
- matplotlib โฅ 3.3.0
- seaborn โฅ 0.11.0
- shap โฅ 0.40.0
๐งช Testing
Run Tests
# Basic test
python test_octolearn.py
# Validation test
python validation.py
# Interactive notebook
jupyter notebook octolearn_demo.ipynb
Example Notebooks
octolearn_demo.ipynb: Interactive feature showcase
๐ License
MIT License - see LICENSE file for details.
๐ค Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Commit changes
- Push to branch
- Open a Pull Request
๐ Support
Issues or Questions?
- Check documentation in ARCHITECTURE.md
- Review octolearn_demo.ipynb
- Open an issue on GitHub
๐ Philosophy
"Build the skeleton first. Then make it breathe."
Octolearn follows modular, automated principles:
- โ Modular Architecture - Each component independent
- โ Automation First - Recommendations, not questions
- โ Professional Quality - Production-ready outputs
- โ Reproducible Results - Hash-based naming
- โ Zero Configuration - Works out of the box
Made with โ and ๐ Logic.
Octolearn v0.5.2 โ Intelligent AutoML for Everyone
Optional distributed execution: if you need scalable runs with large datasets or parallel Optuna trials, install the distributed extras:
pip install .[distributed]
Benchmarks and reproducible examples are available in the benchmarks/ and notebooks/ folders. See benchmarks/README.md for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octolearn-0.5.2.tar.gz.
File metadata
- Download URL: octolearn-0.5.2.tar.gz
- Upload date:
- Size: 786.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07e67bec376367c2ef58db3a1b3a99f677d3560afbfcc28dfac84f3f38f2998
|
|
| MD5 |
49f35553a0d31f80e3ce09ab241a1519
|
|
| BLAKE2b-256 |
a2acb67c8bb4a51cc0ff39ae62702b297ed87fd7bb2916d418ab8fb32805c80d
|
File details
Details for the file octolearn-0.5.2-py3-none-any.whl.
File metadata
- Download URL: octolearn-0.5.2-py3-none-any.whl
- Upload date:
- Size: 744.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
333dc8421f932b8052b570e32c5407d8575f59e37fda6acd9f5fae29b40c9b65
|
|
| MD5 |
e269ece1fafccbaa506f55d4e1720e4c
|
|
| BLAKE2b-256 |
8881cdefb54af0f9677cc6028011ebfd58671dd97211b68e2ce8f7ac1cfac238
|