Skip to main content

A package for auto preprocessing and training machine learning models

Project description

learnify-ml

learnify-ml is a lightweight and modular Python package designed to automate preprocessing pipelines for machine learning datasets. With minimal configuration, it applies standard best practices to clean, transform, and prepare data for training.


Features

Data Preprocessing

  • Automatically detects and fills missing values
  • Identifies and handles outliers
  • Applies skewness correction to numeric features
  • Scales numerical data using standard scaling
  • Encodes categorical variables using label encoding
  • Removes low-variance features
  • Performs VIF analysis to reduce multicollinearity
  • Balances imbalanced datasets using SMOTE
  • Supports feature selection methods

Model Training & Evaluation

  • Trains multiple machine learning models (e.g., Random Forest, XGBoost, Logistic Regression)
  • Automatically selects the best-performing model based on scoring metrics
  • Tracks performance with metrics like accuracy, F1-score
  • Saves trained model and evaluation report as artifacts

Hyperparameter Optimization

  • Supports both GridSearchCV and RandomizedSearchCV
  • Configurable search space for each model
  • Automatically selects best hyperparameters and retrains final model

Installation

pip install learnify-ml

If the package is not yet on PyPI, you can install locally:

git clone https://github.com/yourusername/learnify-ml.git
cd learnify-ml
pip install -e .

Usage

🔹 1. Import the main pipeline class

from learnify_ml import AutoMLPipeline

🔹 2. Run the pipeline

trainer = AutoMLPipeline(target_column="target_column",
                      use_case="regression",
                      apply_hyperparameter_tuning=True,
                      hyperparameter_tuning_method="randomized",
                      apply_tf_idf=False,
                      apply_scale=True,
                      apply_feature_selection=True,
                      apply_outlier=True,
                      apply_vif=True,
                      apply_skewness=True,
                      apply_smote=False,
                      test_size=0.2,
                      impute_strategy="mean",
                      ).run_pipeline()
trainer.run_pipeline()

Example Functions

df = trainer.remove_outliers(df)
df = trainer.handle_missing_values(df)
df = trainer.scale_numeric_features(df)

Each method is modular and can be used independently or inside run_pipeline().

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

learnify_ml-0.0.28.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

learnify_ml-0.0.28-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file learnify_ml-0.0.28.tar.gz.

File metadata

  • Download URL: learnify_ml-0.0.28.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for learnify_ml-0.0.28.tar.gz
Algorithm Hash digest
SHA256 2b14b2e561b5a978f73c6b1910468302ad9013f31a633021d3154a1493b21f1a
MD5 b84aa6624f8b8d32050c04202cdf9143
BLAKE2b-256 713343d3927877ae34ca6bc923dd3f0d442653433836e14b17b77d0c63c7ef4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for learnify_ml-0.0.28.tar.gz:

Publisher: release.yaml on cakiryusuff/learnify-ml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file learnify_ml-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: learnify_ml-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for learnify_ml-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3080434e246e64e1fc4d29baf3033b1756c705c485f3c497c9ab6659ab45ef
MD5 64751f09e65cf61012641f5088e99be5
BLAKE2b-256 1c1883e2497bbd687de61d5b527b36b53dc443e7f9ed7d6d6266b06eb226a583

See more details on using hashes here.

Provenance

The following attestation bundles were made for learnify_ml-0.0.28-py3-none-any.whl:

Publisher: release.yaml on cakiryusuff/learnify-ml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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