skillfed

miceforest

Multiple Imputation by Chained Equations with LightGBM

miceforest v6.0.5 90.8K downloads/30d#13,564 on PyPI411
Permissive license MIT AGING released

What it is and what it does

miceforest implements Multiple Imputation by Chained Equations (MICE), a statistical method for handling missing data by creating multiple plausible imputed datasets. It uses LightGBM as the underlying predictive model, which provides speed and memory efficiency compared to traditional MICE implementations. The package handles both numeric and categorical data automatically and supports mean matching to preserve the distribution of imputed values.

The package is designed for both research and production use. You can create a single imputed dataset for quick analysis, or generate multiple imputed datasets to quantify uncertainty from missing values. It integrates with pandas and numpy, fits into scikit-learn pipelines, and allows you to train models on complete data and apply them to new datasets with missing values. Data can be imputed in place to reduce memory overhead, and trained kernels can be saved and reloaded for consistent imputation of new data.

Use it for:

  • Fill missing values in survey or medical datasets while preserving statistical properties for downstream analysis.
  • Generate multiple imputed datasets to assess how missing-data uncertainty affects model predictions or statistical inference.
  • Impute new, unseen data using models trained on a reference dataset without retraining.
  • Preprocess data with missing values as part of a scikit-learn machine learning pipeline.
  • Handle datasets with mixed numeric and categorical columns automatically without manual encoding.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Performs Multiple Imputation by Chained Equations (MICE) using LightGBM to fill missing values in pandas DataFrames and numpy arrays with statistical rigor and speed.

Yes, if you need production-grade MICE imputation with speed and flexibility. The low install friction, MIT license, and lack of known vulnerabilities make it a safe choice. The aging maintenance status (291 days since last release) is a minor concern but not a blocker—the package is stable and the repository remains active. Install if your workflow requires multiple imputation or if you're working with missing data in pandas/numpy and want LightGBM's speed over traditional methods.

Install

miceforest on PyPI

pip

pip install miceforest

uv

uv add miceforest

poetry

poetry add miceforest

Installing miceforest

Before you install

Low friction install with a pure-Python wheel. Maintenance is aging—last release was 291 days ago—but the repository remains active with 411 stars and no archived status.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

import miceforest as mf
import pandas as pd

# Create kernel with missing data
kernel = mf.ImputationKernel(data_with_missing_values, random_state=1)

# Run MICE algorithm
kernel.mice(2)

# Get completed dataset
imputed_data = kernel.complete_data()

Requires Python 3.10 or later; LightGBM, NumPy, Pandas, PyArrow, and SciPy must be installed.

Verify before relying

  • Whether GPU training support is functional and what GPU libraries are required.
  • Performance benchmarks comparing miceforest to other MICE implementations.
  • Whether the package is actively maintained or in maintenance-only mode given the 291-day release gap.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — lightgbm, numpy, pandas, pyarrow, scipy
Maintenance aging — 291 days since the last release
Last repo commit
First released
Downloads 90,756/month — #13,564 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: miceforest-6.0.5-py3-none-any.whl

Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9

Tags

missing value imputationMICE algorithm pythonlightgbm imputationmultiple imputation chained equationspandas missing data handlingstatistical data imputationmean matching imputation
missing-datastatistical-imputationmachine-learning-preprocessing

More Scientific/Engineering packages