Skip to main content

Beginner-friendly AutoML library for tabular data

Project description

pyezml 🚀

Beginner-Friendly AutoML for Tabular Data

PyPI version Python License Downloads GitHub stars

Train machine learning models in one line of code — no ML expertise required.

pyezml is a lightweight yet powerful AutoML library that automatically handles preprocessing, model selection, and prediction so you can focus on results.

Built for students, developers, analysts, and beginners who want fast, reliable predictions without complex pipelines.


🚀 What's New in v0.2.0

  • Labeled probability predictions
  • Auto-save via save= parameter
  • Automatic .pkl extension handling
  • Robust DataFrame prediction support
  • Built-in sample data generators
  • Unified prediction pipeline

🚀 Installation

pip install pyezml

Optional (recommended for best mode):

pip install lightgbm

Requirements

  • Python ≥ 3.8

⚡ Quick Example

from ezml import train_model

model = train_model("data.csv", target="price")
print(model.score())

That’s it — model trained and evaluated.


🧪 Generate Sample Data (NEW)

No dataset? No problem.

from ezml.datasets import make_classification_data
from ezml import train_model

df = make_classification_data()

model = train_model(df, target="target")
print(model.score())

Perfect for quick testing and demos.


🔮 Labeled Probability Predictions (NEW)

pyezml returns human-readable probabilities:

probs = model.predict_proba({
    "feature_0": 0.5,
    "feature_1": -1.2
})

print(probs)

Example output:

[{'No': 0.12, 'Yes': 0.88}]

No index guessing required.


💾 Auto-Save Models (NEW)

Save automatically during training:

model = train_model(
    df,
    target="target",
    save="my_model"  # .pkl added automatically
)

Manual save still works:

model.save("model.pkl")

🔧 Advanced Usage

from ezml import AutoModel

model = AutoModel(mode="best")  # fast | best
model.train("data.csv", target="price")

print(model.score())
print(model.feature_importance())

⚡ Model Modes

pyezml provides two performance modes:

🚀 fast (default)

  • Model: RandomForest
  • Best for: small to medium datasets
  • Why use it: fast, robust, beginner-safe

🔥 best

  • Model: LightGBM
  • Best for: larger datasets and higher accuracy
  • Why use it: stronger learning on complex tabular data

💡 Automatically falls back to RandomForest if LightGBM is unavailable.


📊 Metrics API

After training:

Classification

  • Accuracy
  • F1-score

Regression

  • R² score
  • MAE

Example:

print(model.metrics_)
print(model.score())  # primary metric

🔮 Flexible Prediction Inputs

Dict (recommended)

model.predict({"feature1": value1, "feature2": value2})

Batch dict

model.predict([
    {"feature1": v1, "feature2": v2},
    {"feature1": v3, "feature2": v4}
])

pandas DataFrame

model.predict(df)

🧹 Automatic Preprocessing

pyezml automatically handles:

  • Missing value imputation
  • Categorical encoding
  • Optional feature scaling
  • Column alignment during prediction

No manual preprocessing required.


📓 Demo Notebook

See the full working example:

👉 examples/pyezml_demo.ipynb


🎯 Project Goal

pyezml aims to make machine learning:

  • simple
  • fast
  • accessible
  • beginner-friendly

without sacrificing real-world usability.


🤝 Contributing

Contributions, issues, and suggestions are welcome!

If you find a bug or have an idea:

  1. Fork the repo
  2. Create a feature branch
  3. Submit a pull request

📜 License

MIT License — free to use and modify.


⭐ Support

If you find pyezml useful, consider giving the repository a star ⭐ It helps the project grow!

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

pyezml-0.2.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

pyezml-0.2.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file pyezml-0.2.1.tar.gz.

File metadata

  • Download URL: pyezml-0.2.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyezml-0.2.1.tar.gz
Algorithm Hash digest
SHA256 70dd26ad14e278b028b9067790fad6fa48f75db28486cf81afd9ac3243aab01e
MD5 5c8c05b453f065402bc7f4634a47eb24
BLAKE2b-256 450444d673b274cd3711ddd6f4e1e912f526c6ef06a1348363a5fe2aa0d8ae57

See more details on using hashes here.

File details

Details for the file pyezml-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyezml-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyezml-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a1fe1b77f6b37751f7d58ce30798042a4d83016a9eee669de9339af005568a
MD5 28c751b47cb8d5b7b05093b891a0abe2
BLAKE2b-256 a4c309ec8b44f61135019e9cb55ebe3bb17ab9b5dac82c280fb8a57c5d1c5556

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