Skip to main content

Data Preprocessing model based on Keras preprocessing layers

Project description

🌟 Keras Data Processor (KDP) - Powerful Data Preprocessing for TensorFlow

Transform your raw data into ML-ready features with just a few lines of code!

KDP provides a state-of-the-art preprocessing system built on TensorFlow Keras. It handles everything from feature normalization to advanced embedding techniques, making your ML pipelines faster, more robust, and easier to maintain.

✨ Key Features

  • 🚀 Efficient Single-Pass Processing: Process all features in one go, dramatically faster than alternatives
  • 🧠 Distribution-Aware Encoding: Automatically detects and optimally handles different data distributions
  • 👁️ Tabular Attention: Captures complex feature interactions for better model performance
  • 🔍 Feature Selection: Automatically identifies and focuses on the most important features
  • 🔄 Feature-wise Mixture of Experts: Specialized processing for different feature types
  • 📦 Production-Ready: Deploy your preprocessing along with your model as a single unit

🚀 Quick Installation

# Using pip
pip install keras-data-processor

# Using Poetry
poetry add keras-data-processor

📋 Simple Example

from kdp import PreprocessingModel, FeatureType

# Define your features
features_specs = {
    "age": FeatureType.FLOAT_NORMALIZED,
    "income": FeatureType.FLOAT_RESCALED,
    "occupation": FeatureType.STRING_CATEGORICAL,
    "description": FeatureType.TEXT
}

# Create and build the preprocessor
preprocessor = PreprocessingModel(
    path_data="data/my_data.csv",
    features_specs=features_specs,
    # Enable advanced features
    use_distribution_aware=True,
    tabular_attention=True
)
result = preprocessor.build_preprocessor()
model = result["model"]

# Use the preprocessor with your data
processed_features = model(input_data)

📚 Comprehensive Documentation

We've built an extensive documentation system to help you get the most from KDP:

Core Guides

Advanced Topics

Integration & Performance

Background & Resources

🖼️ Model Architecture

Your preprocessing pipeline is built as a Keras model that can be used independently or as the first layer of any model:

📊 Performance

KDP outperforms alternative preprocessing approaches, especially as data size increases:

🤝 Contributing

We welcome contributions! Please check out our Contributing Guide for guidelines on how to proceed.

🛠️ Development Tools

KDP includes tools to help developers:

  • Documentation Generation: Automatically generate API docs from docstrings
  • Model Diagram Generation: Visualize model architectures with make generate_doc_content or run:
    python scripts/generate_model_diagrams.py
    
    This creates diagram images in docs/features/imgs/models/ for all feature types and configurations.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • The TensorFlow and Keras teams for their amazing work
  • All contributors who help make KDP better

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

kdp-1.11.0.tar.gz (214.2 kB view details)

Uploaded Source

Built Distribution

kdp-1.11.0-py3-none-any.whl (133.8 kB view details)

Uploaded Python 3

File details

Details for the file kdp-1.11.0.tar.gz.

File metadata

  • Download URL: kdp-1.11.0.tar.gz
  • Upload date:
  • Size: 214.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.11.0-1014-azure

File hashes

Hashes for kdp-1.11.0.tar.gz
Algorithm Hash digest
SHA256 3fe6bc87ff55bed8074f81371af6fdcd09fbd3763769554c8894a1cd5e4fec32
MD5 48ddd1e32ce432e351e65a82f6f70981
BLAKE2b-256 b335edc5277f6921eac34245eccf0a95cd10509965fb1d726e086eebcff04be6

See more details on using hashes here.

File details

Details for the file kdp-1.11.0-py3-none-any.whl.

File metadata

  • Download URL: kdp-1.11.0-py3-none-any.whl
  • Upload date:
  • Size: 133.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.11.0-1014-azure

File hashes

Hashes for kdp-1.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b19ffd05cd9192a17c7054e177984c28f3f54249c53c7a717e5aaebda53eb494
MD5 72791b074400467f97a593d0b00861a9
BLAKE2b-256 0efa71bf56a2ed872947f41c4562837b3003ff6a034591a61250976f9c32066f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page