Skip to main content

Universal Adaptive Imputer – A hybrid VAE + latent nearest neighbor imputation model with uncertainty estimation.

Project description

AURAI – Adaptive Uncertainty-Regularized Autoencoder Imputer

Author: Abdul Mofique Siddiqui
License: MIT
Install via pip:

pip install aurai-imputer

Import it in your Python code:

from AURAI import AURAIImputer

Overview

AURAI (Adaptive Uncertainty-Regularized Autoencoder Imputer) is an advanced hybrid imputation framework that combines:

  • A mask-aware Variational Autoencoder (VAE)
  • Latent-space nearest-neighbor refinement
  • A feature-wise adaptive gating mechanism
  • Monte-Carlo–based uncertainty estimation

AURAI supports both numerical and categorical datasets and performs reliably under:

  • MCAR (Missing Completely At Random)
  • MAR (Missing At Random)
  • MNAR (Missing Not At Random)

The imputer also produces confidence intervals for each filled value, making it suitable for decision-critical applications.

Installation

Install the package via pip:

pip install aurai-imputer

How It Works

  • Global VAE Module Learns latent structure and reconstructs both numeric and categorical distributions.
  • Latent-Space KNN Module Uses nearest neighbors in latent space to refine local predictions.
  • Adaptive Gating Produces a learnable per-feature weight that blends global (VAE) and local (KNN) imputations.
  • Uncertainty Estimation Monte-Carlo sampling over latent variables yields:
    • Posterior means
    • 95% confidence intervals
  • Mixed Data Support Uses StandardScaler + OrdinalEncoder to handle mixed data seamlessly.

Getting Started

1. Import the package

from AURAI import AURAIImputer

2. Initialize the imputer

imputer = AURAIImputer()

3. Fit the model

imputer.fit(df)
  • df: pandas DataFrame containing numerical and/or categorical columns

4. Impute missing values

imputed = imputer.transform(df)

Returns a NumPy array with missing values filled.

5. Impute with uncertainty intervals

mean, lower, upper = imputer.transform(df, return_intervals=True)

API Reference

AURAIImputer()

Initializes the imputer. Supports optional parameters such as latent dimension, Monte Carlo samples, neighbors count, etc.

.fit(df)

Fits the model to training data.

Parameters:

  • df: pandas DataFrame with mixed features

.transform(df, return_intervals=False)

Returns imputed values.

Input:

  • df: DataFrame or numpy array with missing values

Output:

  • A NumPy array with imputed values
  • If return_intervals=True: returns (mean, lower, upper)

.save(path)

Saves:

  • model weights
  • preprocessor
  • metadata

.load(path)

Loads a previously saved AURAI model.

Example Usage

Example 1: Basic Imputation

from AURAI import AURAIImputer
import pandas as pd

df = pd.read_csv("data.csv")
imputer = AURAIImputer()
imputer.fit(df)
imputed = imputer.transform(df)

Example 2: Imputation with Uncertainty

mean, lower, upper = imputer.transform(df, return_intervals=True)

Internals

  • Variational Autoencoder (VAE) Learns global structure and reconstructs numeric means, variances, and categorical logits.
  • Latent-Space Nearest Neighbor Search Provides local refinement to improve imputation accuracy.
  • Gating Network Learns per-feature blending weights for global + local fusion.
  • Cluster Regularization Encourages structured and stable latent geometry.
  • Monte Carlo Sampling Produces mean predictions and confidence intervals.

Notes

  • Works with both numeric and categorical data.
  • Performs well under MCAR, MAR, and MNAR.
  • Provides uncertainty intervals for downstream tasks.
  • GPU recommended for training large datasets.

Author

Abdul Mofique Siddiqui

License

This project is licensed under the 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

aurai_imputer-1.0.5.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

aurai_imputer-1.0.5-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file aurai_imputer-1.0.5.tar.gz.

File metadata

  • Download URL: aurai_imputer-1.0.5.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for aurai_imputer-1.0.5.tar.gz
Algorithm Hash digest
SHA256 c6e2006228875f9c98dc344216217af65e1364404a1785b0d1f1e378689c2a69
MD5 74217c53a9195d9a590f511877ca9f36
BLAKE2b-256 3058944f1e43c4e701d2294aedf5e6ecb0dfacc6be1b252c19ed7f96bffbef15

See more details on using hashes here.

File details

Details for the file aurai_imputer-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: aurai_imputer-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for aurai_imputer-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fe5d7f59808ecb1d9c3db331053cea3eea70384522410ac6a3ed3f6a1f7c526c
MD5 51a4e07f6707359c54f3fd54b66f77a1
BLAKE2b-256 3ef9cb6dff47d63cca80463f4410e46acf6f8f8a2c4797469c7d70c99783ceef

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