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.4.tar.gz (9.2 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.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlbuddy_learn-0.1.4.tar.gz
  • Upload date:
  • Size: 9.2 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.4.tar.gz
Algorithm Hash digest
SHA256 eeaf41e9fb9a2b820c8c17cf8171ef923ba4ff3b4bd7a0275e6939187ce2c1fd
MD5 61fc0fedf20b1867f963caf01841f1b7
BLAKE2b-256 49761c84000377c97cf59a8194adf4812e84f1a9c4d8872d1a12752279e7665b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlbuddy_learn-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7eae407dc04fb2511caef7773ad63a454eeac632b38d1a3b6e7b750528f17698
MD5 e8c2c8c6eabfb9821c559c87b6bc907c
BLAKE2b-256 dd91c28442e07a049abb6f5a19ccd41114449dcb681ad27ccce095b74171b1e3

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