Skip to main content

An ML library that guides beginners step by step

Project description

🤖 MLBuddy

PyPI version License: MIT Python Support

Your friendly machine learning companion. Build models, understand what they learned, and receive step-by-step guidance to improve them — all with just a few lines of code.

MLBuddy is designed to bridge the gap between complex machine learning workflows and beginners. Instead of treating models as a "black box," MLBuddy actively guides you through the process, explains your model's decisions visually, and suggests actionable next steps to boost performance.


✨ Key Features

  • ⚡ Automated Model Comparison (mlbuddy.compare): Compare multiple ML architectures (Logistic Regression, Decision Trees, Random Forests, SVMs) in one command to find the absolute best match for your dataset.
  • 📊 Transparent Explanations (model.explain()): Instantly generate feature importance bar charts or coefficients to see exactly which features drive your model's predictions.
  • 💬 Actionable Feedback suggestions (model.suggest()): Receive direct, intelligent hints on how to improve your model based on its performance metrics (e.g., handling overfitting, engineering features, or tuning hyperparameters).
  • 📦 Zero-Config Data Prep (mlbuddy.load_csv): Automatically handles data scaling and splitting with intelligent defaults.

🚀 Quickstart

Get up and running in less than 60 seconds.

1. Installation

pip install mlbuddy-learn

2. The Golden Workflow

Here is how simple it is to load, compare, train, explain, and improve a machine learning model:

import mlbuddy as ml

# 1. Load and prepare your dataset
X_train, X_test, y_train, y_test = ml.load_csv("your_data.csv", target_column="hired")

# 2. Compare all models to find the winner
results = ml.compare(X_train, X_test, y_train, y_test)

# 3. Train the best performing model
model = ml.train(X_train, X_test, y_train, y_test, model="random_forest")

# 4. Peer into the black box (generates a feature importance plot!)
model.explain()

# 5. Get tailored recommendations to improve accuracy
model.suggest()

🛠️ Project Architecture

mlbuddy/
├── auto/
│   ├── data.py         # Scaling, train/test splitting, and CSV preprocessing
│   └── trainer.py      # Guided Model wrapper, training routines, and model comparison
├── explain/
│   └── visualizer.py   # Automatic feature importance & coefficient plotting
└── guide/
    └── suggest.py      # Rule-based suggestions engine tailored to accuracy thresholds

💡 How it Guides You

When you call model.suggest(), MLBuddy analyzes your model's accuracy and provides contextual advice:

  • Low Accuracy (< 60%): Recommends looking into data quality, checking labels, or gathering more samples.
  • Moderate Accuracy (60% - 80%): Suggests trying more robust architectures (like Random Forests) and hyperparameter tuning.
  • High Accuracy (> 90%): Flags potential overfitting risks, duplicates in the dataset, and guides you on preparing for production.

💻 Development Setup

Clone the repository and set up a local development environment:

# Clone the repository
git clone https://github.com/Mohammedjaasir/mlbuddy-learn.git
cd mlbuddy-learn

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

📄 License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlbuddy_learn-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlbuddy_learn-0.1.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file mlbuddy_learn-0.1.2.tar.gz.

File metadata

  • Download URL: mlbuddy_learn-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for mlbuddy_learn-0.1.2.tar.gz
Algorithm Hash digest
SHA256 77e4acecd03fef3e46cf3d74818df9f7955542746c5538ea3429e0dd0544c898
MD5 55f57804b1ca837ac5258dcec97b6a57
BLAKE2b-256 d256d7709b1986e8400bc120a8ed3054d0cf49b848d75f1d4bcdde60f14ed243

See more details on using hashes here.

File details

Details for the file mlbuddy_learn-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mlbuddy_learn-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for mlbuddy_learn-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e8ef714ddcef446cfd8617ab4e2f3edc5810dc2f7433a633b44461a83bd6091
MD5 d61d1e5bb6c75f26db0ce3093455d428
BLAKE2b-256 da2929a27b48c83a455778034af45edb1bd987d66c7d9303c67cd899a4da03bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page