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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyezml-0.2.2.tar.gz
  • Upload date:
  • Size: 11.8 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.2.tar.gz
Algorithm Hash digest
SHA256 f30f39e7328f228fadfe91e32bf354578321199a763659dfecd8f798840f8a68
MD5 b10674f90dc4f1454c4eefecba4e4b7d
BLAKE2b-256 b36dedc8c8a2f1fc2f99f3fcb7272736d15f29c153fb3805a4e963d565dd784e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyezml-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bf1df3f60487efb884f61ee2e6e22a5e861e1a6f7464fc8a0b56c3415c12d41
MD5 ef931520841094e298f31f65b9a72639
BLAKE2b-256 8d133b79830085dfbe5143afb209b4c149c4249138bb0e12445c142e8d33a9d3

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