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.0.tar.gz (5.3 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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autopreprocessor-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 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.0.tar.gz
Algorithm Hash digest
SHA256 9331f54ee9e13883bc49b791a1df1ac18ddec652027fedf4514b212fd6c9e5a8
MD5 e5ce04baf3a6395ba2149df9f49d0ead
BLAKE2b-256 bea82b32f58a14b5787b584030f6deac8cc2550b467bcca604607478c0f08b78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autopreprocessor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 296f0c805c5addac4610adda55fe55b358ddbfa281b7de78558594f6a576794e
MD5 a4d8c049e2a8b173b70ee0f3f85b8510
BLAKE2b-256 fc1d47a1638605066e326600144918bbf53270d493584d72a8a7e1ea3cbaaf7a

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