Skip to main content

Reusable machine learning toolkit for summary statistics, correlation, preprocessing, and model selection.

Project description

mlprimer

CI PyPI version

mlprimer is a Python package that assists with early-stage machine learning workflows. It helps users perform data profiling, feature correlation testing, preprocessing with class balancing, model training, and evaluation across common classifiers.

Features

  • Generate summary statistics from cleaned datasets
  • Identify meaningful feature-target relationships
  • Apply SMOTE to handle class imbalance
  • Compare baseline classification models
  • Perform hyperparameter tuning with GridSearch and RandomizedSearch

Installation

📦 From GitHub (direct)

pip install git+https://github.com/Kingkong2408/mlprimer.git

📦 From PyPI

pip install mlprimer

Usage

from mlprimer import (
    calculate_summary,
    check_correlation,
    apply_smote,
    split_data,
    train_models,
    evaluate_models
)

# Summary
summary = calculate_summary(df)

# Correlation
correlation = check_correlation(df, target="target_column")

# Preprocessing
X_res, y_res = apply_smote(X, y)
X_train, X_test, y_train, y_test = split_data(X_res, y_res)

# Modeling
models = train_models(X_train, y_train)
results = evaluate_models(models, X_test, y_test)
print(results)

Development Goals

  • Add support for regression models
  • Include more preprocessing tools (e.g., imputation, encoding helpers)
  • Improve pipeline integration and configuration support

License

MIT

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

mlprimer-0.1.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

mlprimer-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mlprimer-0.1.2.tar.gz.

File metadata

  • Download URL: mlprimer-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for mlprimer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c453cf449aedc9178b2f81580328777441ccbec71a2fafd083e585d0e69655ee
MD5 f1cd302e16f62962080a92562898f413
BLAKE2b-256 05fe2685ab225050401852edaa5950153940dbcb1e18f2d436dce00a79e0e6ff

See more details on using hashes here.

File details

Details for the file mlprimer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mlprimer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for mlprimer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e106bf51d73779b3833aaa1bb70727fc162ffe913cc987f9da11490082136f8
MD5 a77808c6f9c57a4f1f700bf59bb42527
BLAKE2b-256 906fdf9f5b16df72013ba6db76abd263c4611d916748c61faddcbfbc7c7b8df1

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