Skip to main content

All about missing data mechanisms: simulation, analysis, and visualization

Project description

🧩 MissMecha

MissMecha is a Python package dedicated to the systematic simulation, visualization, and evaluation of missing data mechanisms. Our goal is to provide a unified interface for generating, inspecting, and analyzing missingness — supporting research, benchmarking, and education.


Highlights

  • 🔍 All About Missing Mechanisms

    • Simulate MCAR, MAR, and MNAR in flexible formats
    • Currently supports:
      • 3× MCAR strategies
      • 8× MAR strategies
      • 6× MNAR strategies
      • Experimental support for categorical and time series missingness
  • Missingness Pattern Visualization

    • Visual tools to observe missing patterns
    • Helps identify potential mechanism types (MCAR vs MAR vs MNAR)
  • Flexible Generator Interface

    • Column-wise or global missingness simulation
    • Sklearn-style fit / transform methods
    • Supports custom rates, dependencies, labels, and logic
  • Evaluation Toolkit

    • Quantitative metrics including MSE, MAE, RMSE, and AvgERR
    • Built-in support for Little’s MCAR test
  • SimpleSmartImputer

    • Lightweight imputer that automatically detects numerical and categorical columns
    • Applies mean or mode imputation with verbose diagnostics

Motivation

Working with missing data often involves disparate implementations and inconsistent assumptions across studies.
MissMecha brings together widely used missing data mechanisms into a single, structured, and reproducible Python framework.

Whether you're designing benchmark experiments or exploring real-world data — MissMecha lets you simulate and analyze missingness with clarity and control.


⚡ Quick Preview

from missmecha import MissMechaGenerator

generator = MissMechaGenerator(
    info={
        0: {"mechanism": "mar", "type": 1, "rate": 0.3}
    }
)
generator.fit(X)
X_missing = generator.transform(X)

Documentation & Notebooks

  • Full documentation: [Link coming soon]
  • Demo notebooks:
    • demo_generate.ipynb
    • demo_analysis.ipynb
    • demo_visual.ipynb

Installation

pip install missmecha-py  # Coming soon on PyPI

Author

Developed by Youran Zhou, PhD Candidate @ Deakin University
With support from the open-source research community ❤️


📄 License

MIT License

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

missmecha_py-0.1.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

missmecha_py-0.1.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: missmecha_py-0.1.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for missmecha_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3eea8c475b772d5d9f2daa55a36c754b850fd45d2e5c1fcfd00a922dc2cf9c3
MD5 ea65f617da2c1f6ed490788c8688fa39
BLAKE2b-256 f1fad1cbe9fcd116b24a715a4eed8599d89fef4df1543a1467300b67c3ff6d76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: missmecha_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for missmecha_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8d8b076b800ba4fe721396bdd328c408dc14f841b69fa7b460e6329cb1cf627
MD5 4a4f751c1fade297391d39545e0735b3
BLAKE2b-256 c665bb60a123c90f616407bc1533f15fd0e50d6006301719d220fa629fe090d2

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