FeatureForge LLM: Automated Feature Engineering with Large Language Models
Overview
FeatureForge LLM is an innovative Python package that leverages large language models (LLMs) to automate and enhance feature engineering processes. By utilizing advanced AI capabilities, this package helps data scientists and machine learning engineers discover, generate, and implement intelligent features across various datasets.
Key Features
- 🤖 AI-Powered Feature Suggestions: Generate feature engineering recommendations using state-of-the-art language models
- 🛠️ Automatic Feature Implementation: Automatically convert feature suggestions into executable Python code
- 🔒 Safe Code Execution: Built-in safety checks to ensure secure feature generation
- 📊 Multi-Provider Support: Compatible with multiple LLM providers like OpenAI and Google Gemini
- 📈 Performance Benchmarking: Analyze feature implementation performance and impact
Installation
pip install featureforge-llm
Quick Start
from featureforge_llm import LLMFeaturePipeline
# Initialize the pipeline with your LLM provider
pipeline = LLMFeaturePipeline(
llm_api_key="YOUR_API_KEY",
provider="gemini", # or "openai"
model="gemini-1.5-flash",
verbose=True
)
# Define your task description and dataset background
task_description = (
"Predict the disease state of patients with liver cirrhosis. "
"The objective is to use multi-classification methods to predict "
"the final disease status of patients."
)
dataset_background = (
"This dataset contains various physiological indicators "
"and treatment plans for liver cirrhosis patients."
)
# Get feature suggestions
suggestions = pipeline.ask_for_feature_suggestions(
df=train_data,
task_description=task_description,
target_column="Status",
dataset_background=dataset_background
)
# Implement all suggested features
result_df = pipeline.implement_all_suggestions(train_data)
Advanced Usage
Custom Feature Request
# Create a custom feature with a natural language description
custom_feature_df = pipeline.custom_feature_request(
df=train_data,
feature_description="Create an interaction feature between patient age and treatment duration"
)
Performance Benchmarking
# Benchmark a specific feature implementation
benchmark_results = pipeline.benchmark_feature_implementation(
df=train_data,
suggestion_id="your_suggestion_id",
iterations=5
)
Supported LLM Providers
- OpenAI (GPT models)
- Google Gemini
- More providers coming soon!
Dependencies
- pandas
- numpy
- openai (optional)
- google-generativeai (optional)
Configuration
llm_api_key: Your API key for the selected LLM providerprovider: "openai" or "gemini"model: Specific model to use (e.g., "gpt-4", "gemini-1.5-flash")verbose: Enable detailed logging (default: True)
Contributing
Contributions are welcome! Please check our GitHub repository for guidelines.
License
MIT License
Disclaimer
Feature suggestions are generated by AI and should be carefully reviewed by domain experts before implementation.
Metadata
Release files for featureforge-llm 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| featureforge_llm-1.0.0.tar.gz | 24.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| featureforge_llm-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.1 kB
Release files / featureforge_llm-1.0.0.tar.gz
| Download URL | featureforge_llm-1.0.0.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6d580c9f1919d870c3d6686cea685be7497dca656c668edd8914e1961c09ad5
|
|
BLAKE2b-256 checksum How to use checksums |
51075a650703b36042a7c0165216936771ee93b09c16b460d360ea5bdc4837ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / featureforge_llm-1.0.0-py3-none-any.whl
| Download URL | featureforge_llm-1.0.0-py3-none-any.whl |
|---|---|
| Size | 30.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ee146c3602b4bf50f0a1876f101741b232a14fbacb4e85e3584ee66c56ef987
|
|
BLAKE2b-256 checksum How to use checksums |
d7f88e3fc5a4ac535c29d4d8a89767d4e427f5200e42998ca7c6eb5b81539296
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for featureforge-llm 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.