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.3.tar.gz (9.1 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.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlbuddy_learn-0.1.3.tar.gz
  • Upload date:
  • Size: 9.1 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.3.tar.gz
Algorithm Hash digest
SHA256 d4126f1f5a24963477070379c4ab8de68171959c0df15d3e763f3935c4ac5143
MD5 42ef7478807945eecb1e17c05ef28732
BLAKE2b-256 75ec5224569aec7ead365e1a4cd3410451fc423266ad8726ef82abc6f550e627

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlbuddy_learn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f5466734b204e130852676a2fa128a325317491c536f3a6a1abef0f7824f418a
MD5 156068d896292766fc919d09c3cba02c
BLAKE2b-256 2a4d60ad1b9888c415c9cb79634ee8b4488b9386dc30f8e2f779527097cdfdba

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