Skip to main content

Automatic preprocessing for tabular datasets using heuristics and RAG-assisted encoding detection.

Project description

AutoPreprocessor

An experimental AutoML preprocessing package that combines rule-based preprocessing with a lightweight Retrieval-Augmented Generation (RAG) system to automatically suggest encoding strategies for tabular datasets.

The project uses Sentence Transformers and ChromaDB locally. It does not rely on external LLM APIs.

Features

  • Mean, median, and mode imputation
  • Label encoding for binary columns
  • One-hot encoding
  • RAG-assisted ordinal encoding
  • Standard scaling and robust scaling
  • Automatic dropping of columns with excessive missing values

Installation

Install locally from the project root:

pip install .

For development, you can also install dependencies directly:

pip install -r requirements.txt

Usage

import pandas as pd
from autopreprocessor import AutoPreprocessor

data = pd.read_csv("sample.csv")

auto = AutoPreprocessor()
X_processed = auto.fit_transform(data)

print(auto.report_)

RAG And ChromaDB

The package preserves the existing RAG behavior and ChromaDB usage. AutoPreprocessor loads the persistent ChromaDB collection named rag_collection from:

autopreprocessor/chroma_db/

The ChromaDB path is resolved with pathlib relative to the installed package location, so it can work across machines and operating systems.

Project Structure

AutoPreprocessor/
|
|-- autopreprocessor/
|   |-- __init__.py
|   |-- auto_preprocessor.py
|   |-- chroma_db/
|
|-- requirements.txt
|-- setup.py
|-- pyproject.toml
|-- README.md
|-- .gitignore

API

from autopreprocessor import AutoPreprocessor

AutoPreprocessor exposes:

  • fit(data)
  • transform(data)
  • fit_transform(data)
  • report_

The preprocessing logic is preserved from the original notebook implementation.

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

autopreprocessor-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

autopreprocessor-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file autopreprocessor-0.1.1.tar.gz.

File metadata

  • Download URL: autopreprocessor-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for autopreprocessor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9f8c065732e1a061315ca546bbbfce13ebe1e126a28dd3c9375e05b2773ec311
MD5 1da5286703f2d9278bd00cc155abf939
BLAKE2b-256 1d9ff7083029e30d75344f7b29012cb6ec8f52fe64805840cbf1980ad3b9f053

See more details on using hashes here.

File details

Details for the file autopreprocessor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autopreprocessor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e50a97deac1d1a0afb1de7b7bd3ca2c270fbd40815b45d524f97007bb9a0c2e8
MD5 6a80a8626c9d191c2d141ea8d22043fe
BLAKE2b-256 774cb69306c6de6c827f9448c88bec9ee2b6fffbc905b6cb75ecc2458cd28fa3

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