GenAI-powered agent-based tool for automated data science workflows
Project description
AutoDS Copilot
๐ค A GenAI-powered agent-based tool for automated data science workflows
AutoDS Copilot is an intelligent Python package that automates exploratory data analysis, feature engineering, and machine learning model development through natural language prompts. Simply describe what you want to achieve, and let the AI agent handle the implementation details.
๐ Key Features
- Natural Language Interface: Interact with your data using simple prompts like "Build a regression model with target = price"
- Automated EDA: Comprehensive exploratory data analysis with visualizations and insights
- Smart Feature Engineering: Automatic categorical encoding (OneHot, Ordinal, Target, etc.)
- ML Model Selection: Dynamically selects and trains suitable models for classification or regression
- Safe Code Execution: Internal Python interpreter with security safeguards
- Modular Architecture: Clean, extensible design for easy customization
- Multiple Data Sources: Support for CSV files and pandas DataFrames
- Rich Outputs: Evaluation metrics, visualizations, and model interpretability
๐ฆ Installation
pip install autods-copilot
๐ง Quick Start
from autods_copilot import AutoDSCopilotAgent
# Initialize the agent
agent = AutoDSCopilotAgent()
# Load your dataset
agent.load_csv("data/house_prices.csv")
# Let the AI handle the rest!
result = agent.run("Perform EDA and build a regression model to predict house prices")
# Get insights and visualizations
print(result.summary)
result.show_plots()
Advanced Usage
# More specific prompts
agent.run("Create correlation heatmap and identify top 5 features for price prediction")
agent.run("Apply one-hot encoding to categorical variables and train Random Forest")
agent.run("Compare performance of Linear Regression vs XGBoost vs Neural Network")
# Direct data loading
import pandas as pd
df = pd.read_csv("your_data.csv")
agent.load_dataframe(df)
agent.run("Build classification model for target column 'category'")
With OpenAI Integration (Enhanced)
import os
from autods_copilot import AutoDSCopilotAgent
# Set your OpenAI API key
agent = AutoDSCopilotAgent(
openai_api_key=os.getenv('OPENAI_API_KEY'),
llm_model="gpt-4o" # or "gpt-4o-mini" for cost-effective option
)
# Load data
agent.load_csv("titanic.csv")
# Ask sophisticated natural language questions
result = agent.run("""
Analyze the Titanic dataset to understand survival patterns.
Focus on how passenger class, age, and gender influenced survival rates.
Create visualizations and build a predictive model.
""")
## ๐ Package Structure
autods_copilot/ โโโ init.py # Package initialization โโโ agent/ โ โโโ init.py โ โโโ copilot_agent.py # Main agent orchestrator โ โโโ response_handler.py # Response processing โโโ interpreter/ โ โโโ init.py โ โโโ python_executor.py # Safe code execution engine โ โโโ security.py # Security validators โโโ modules/ โ โโโ init.py โ โโโ eda/ โ โ โโโ init.py โ โ โโโ analyzer.py # EDA analysis โ โ โโโ visualizer.py # Plot generation โ โโโ encoding/ โ โ โโโ init.py โ โ โโโ categorical.py # Encoding strategies โ โ โโโ numerical.py # Numerical preprocessing โ โโโ modeling/ โ โโโ init.py โ โโโ classifier.py # Classification models โ โโโ regressor.py # Regression models โ โโโ evaluator.py # Model evaluation โโโ prompts/ โ โโโ init.py โ โโโ templates/ โ โ โโโ eda_prompts.py # EDA prompt templates โ โ โโโ encoding_prompts.py # Encoding prompts โ โ โโโ modeling_prompts.py # ML prompts โ โโโ prompt_manager.py # Prompt orchestration โโโ utils/ โ โโโ init.py โ โโโ config.py # Configuration management โ โโโ logger.py # Logging utilities โ โโโ validators.py # Input validation โโโ config/ โโโ default_config.yaml # Default settings โโโ model_configs.yaml # ML model parameters
## ๐ฏ Use Cases
- **Data Scientists**: Rapid prototyping and baseline model development
- **Business Analysts**: Quick insights from data without coding
- **ML Engineers**: Automated feature engineering pipelines
- **Students**: Learning data science through AI guidance
- **Researchers**: Fast experimental setup and comparison
## ๐ฃ๏ธ Roadmap
### Phase 1: Core Foundation โ
- [x] Basic agent architecture
- [x] Safe code execution engine
- [x] Modular EDA capabilities
- [x] Simple encoding strategies
### Phase 2: Enhanced Intelligence ๐ง
- [ ] Advanced prompt engineering
- [ ] Context-aware model selection
- [ ] Automated hyperparameter tuning
- [ ] Multi-step workflow planning
### Phase 3: LLM Integration ๐
- [ ] OpenAI GPT-4 adapter
- [ ] Anthropic Claude support
- [ ] Local LLM compatibility (Ollama)
- [ ] Custom fine-tuned models
### Phase 4: Advanced Features ๐
- [ ] Time series analysis
- [ ] Deep learning models
- [ ] AutoML integration
- [ ] Model deployment helpers
- [ ] Interactive dashboards
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
```bash
# Development setup
git clone https://github.com/your-org/autods-copilot.git
cd autods-copilot
pip install -e ".[dev]"
pytest tests/
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with โค๏ธ for the data science community
- Inspired by the need for accessible AI-powered analytics
- Special thanks to all contributors and beta testers
Ready to revolutionize your data science workflow? Install AutoDS Copilot today!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autods_copilot-0.1.0.tar.gz.
File metadata
- Download URL: autods_copilot-0.1.0.tar.gz
- Upload date:
- Size: 50.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
027deadd86d7f7a1fd68f3477afa1182bf5c167b38725b49c5674c14d8c04d97
|
|
| MD5 |
6f378c615e03807718629c5f88678e62
|
|
| BLAKE2b-256 |
4145fda69cbfa0ff9c3705016231f20133b74c11ea7caf8452e0cffc96c67575
|
File details
Details for the file autods_copilot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autods_copilot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 62.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c08e416742faffa3384b797c589e43ab34863715563673632c98334e7d4919d
|
|
| MD5 |
ef4b2f77049a74fd4964ea04a83b9f6b
|
|
| BLAKE2b-256 |
cef812f211c8f240bd5a2b8d27ca8cc281044fd720e8e290627e32e7f4d8cf86
|