Skip to main content

Give any dataset an ML-readiness score from 0-100 with actionable suggestions.

Project description

mlreadyscore

Give any dataset an ML-readiness score from 0–100 with actionable suggestions.

Stop guessing if your data is ready for Machine Learning. mlreadyscore analyzes your dataset and gives you a clear score, issues list, and fix suggestions — all in one line of code.

Installation

pip install mlreadyscore

Quick Start

from mlreadyscore import check

# From a CSV file
report = check("my_data.csv")
print(report)

# From a DataFrame
import pandas as pd
df = pd.read_csv("sales.csv")
report = check(df, target="revenue")
print(report.score)       # 72.5
print(report.grade)       # B-
print(report.suggestions) # ['DROP column X...', 'IMPUTE column Y...']

Output

============================================================
   ML READINESS REPORT
============================================================
   Dataset:  5000 rows × 12 columns
   Score:    72.5 / 100  (B-)
------------------------------------------------------------

   CHECK SCORES:
   --------------------------------------------
   Dataset Size             [###############]  100.0
   Missing Values           [##########.....]   68.3
   Duplicate Rows           [###############]  100.0
   Data Types               [############...]   85.0
   Outliers                 [##########.....]   70.2
   Multicollinearity        [#########......]   60.0
   Class Imbalance          [########.......]   55.0
   Constant Features        [###############]  100.0
   High Cardinality         [############...]   82.0

   ISSUES FOUND (5):
   --------------------------------------------
    1. 'address' has 42.3% missing — significant gaps
    2. 'price' has 8.2% outliers
    3. 'area' & 'sqft' have 0.97 correlation — near identical
    4. Moderate imbalance: minority/majority ratio = 0.25
    5. 'zipcode' has 847 unique values — high cardinality

   SUGGESTIONS (5):
   --------------------------------------------
    1. IMPUTE 'address' with median/mode
    2. CLIP or TRANSFORM 'price' (log transform or winsorize)
    3. DROP one of 'area' or 'sqft'
    4. TRY class_weight='balanced' or stratified sampling
    5. REDUCE 'zipcode' cardinality with grouping

   --------------------------------------------
   VERDICT: Needs work. Address the suggestions before training.
============================================================

What It Checks

Check What It Catches
Dataset Size Too few rows, too many columns, curse of dimensionality
Missing Values Null/NaN values per column with severity rating
Duplicate Rows Exact duplicate rows that can bias your model
Data Types Numbers stored as text, dates as strings, mixed types
Outliers Extreme values using IQR method
Multicollinearity Highly correlated features (>0.85)
Class Imbalance Skewed target distribution for classification
Constant Features Zero-variance columns that add no information
High Cardinality Categorical columns with too many unique values

Supported File Formats

  • .csv — CSV files
  • .tsv — Tab-separated files
  • .xlsx / .xls — Excel files (requires pip install mlreadyscore[excel])
  • .json — JSON files
  • .parquet — Parquet files (requires pip install mlreadyscore[parquet])

API Reference

check(data, target=None)

Main function. Accepts a file path or DataFrame.

report = check("data.csv")
report = check(df, target="label")

ReadinessReport

The returned report object:

report.score        # float: 0-100
report.grade        # str: "A+" to "F"
report.issues       # list[str]: all issues found
report.suggestions  # list[str]: actionable fixes
report.checks       # list[dict]: individual check results
report.summary      # str: one-line verdict

report.to_dict()    # export as dictionary
report.to_json()    # export as JSON string
report.save("report.json")  # save to file

Individual Checks

Run specific checks independently:

from mlreadyscore import check_missing, check_outliers, check_imbalance

result = check_missing(df)
print(result["score"])      # 85.0
print(result["issues"])     # ["'age' has 12.3% missing"]
print(result["suggestions"])  # ["IMPUTE 'age' with mean/median/mode"]

Use Cases

  • Before training: Run check() to catch problems early
  • In CI/CD pipelines: Automate data validation with score thresholds
  • Teaching/learning: Understand what makes data ML-ready
  • Data handoff: Share reports with teammates when passing datasets

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

git clone https://github.com/yourusername/mlreadyscore.git
cd mlreadyscore
pip install -e ".[dev]"
pytest

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

mlreadyscore-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

mlreadyscore-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file mlreadyscore-0.1.0.tar.gz.

File metadata

  • Download URL: mlreadyscore-0.1.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.10

File hashes

Hashes for mlreadyscore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 090b21e8996cf9d2ca16e9f420646f1256eea69e6db9c43ea9a43a395e33918d
MD5 4fbdc2b980019ec0278ce53fd1afacd5
BLAKE2b-256 22a609a5ed5d93f2a90edb0186b950c5ede664127549391234dd205cf6ea4c1d

See more details on using hashes here.

File details

Details for the file mlreadyscore-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mlreadyscore-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.10

File hashes

Hashes for mlreadyscore-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e797a06cf758fe162ee0100b5e75864b3f63c78f045d981ae42061cb7e450e4a
MD5 1a7d5c3826729bc96a1f97c317cf24b0
BLAKE2b-256 15e1c490fd051bb57925d659a7557b4be21718792f3a408dfa42a86fb790199e

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