Metadata-Version: 2.1
Name: marketing-analytics-toolkit
Version: 0.1.2
Summary: Advanced marketing analytics toolkit for customer segmentation and analysis
Home-page: https://github.com/anilcogalan/advanced_marketing_tool
Author: Anil Cogalan
Author-email: anilcogalan@gmail.com
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy >=1.19.2
Requires-Dist: pandas >=1.2.0
Requires-Dist: scikit-learn >=0.24.0
Requires-Dist: tensorflow >=2.4.0
Requires-Dist: networkx >=2.5
Requires-Dist: plotly >=4.14.0
Requires-Dist: lifelines >=0.25.0
Requires-Dist: xgboost >=1.3.0
Requires-Dist: shap >=0.40.0
Requires-Dist: category-encoders >=2.3.0
Requires-Dist: feature-engine >=1.2.0
Requires-Dist: optuna >=2.10.0
Requires-Dist: umap-learn >=0.5.3
Requires-Dist: scipy >=1.7.0
Requires-Dist: statsmodels >=0.13.0
Provides-Extra: dev
Requires-Dist: pytest >=6.2.0 ; extra == 'dev'
Requires-Dist: pytest-cov >=2.12.0 ; extra == 'dev'
Requires-Dist: sphinx >=4.0.0 ; extra == 'dev'
Requires-Dist: sphinx-rtd-theme >=0.5.0 ; extra == 'dev'

# Marketing Analytics Toolkit

![PyPI version](https://img.shields.io/pypi/v/marketing-analytics-toolkit.svg)
![Python versions](https://img.shields.io/pypi/pyversions/marketing-analytics-toolkit.svg)
![License](https://img.shields.io/github/license/anilcogalan/advanced_marketing_tool.svg)

The Marketing Analytics Toolkit is a comprehensive Python library designed for marketing professionals and data scientists. This toolkit provides advanced marketing analytics tools for customer segmentation, marketing mix optimization, and customer lifecycle analysis.

## 🚀 Features

### 🎯 Customer Segmentation
- **Multiple Segmentation Methods**: K-means, Gaussian Mixture, DBSCAN, Hierarchical Clustering.
- **Automatic Feature Selection**: Automatically selects the best features for segmentation.
- **Segment Profiling**: Analyzes the characteristics of each segment.
- **Segment Transition Analysis**: Calculates transition probabilities between segments.

### 📊 Marketing Mix Optimization
- **Dynamic Pricing**: Predicts optimal price points.
- **Elasticity Analysis**: Analyzes the impact of price changes on demand.
- **Competition-Based Pricing**: Considers competitor prices in pricing strategies.

### 🔄 Customer Lifecycle Analysis
- **RNN-Based Behavior Modeling**: Predicts customer behaviors using recurrent neural networks.
- **Survival Analysis**: Estimates customer lifetime and churn probabilities.
- **CLV Prediction**: Calculates Customer Lifetime Value.
- **Churn Prediction**: Estimates the likelihood of customer churn.

### 📈 Channel Attribution Modeling
- **Markov Chain Attribution**: Analyzes the effects of different channels.
- **Shapley Value Attribution**: Calculates contributions of each channel.
- **Data-Driven Attribution**: Machine learning-based attribution methods.

### 🛠️ Data Preprocessing Utilities
- **Advanced Data Validation**: Comprehensive data validation checks.
- **Outlier Detection**: Identifies and handles outliers in datasets.
- **Feature Engineering**: Includes methods for feature selection and encoding.

### 📊 Visualization Tools
The library provides various visualization tools to help interpret the results of analyses and models.

## 🛠️ Installation

### Install via pip:
```bash
pip install marketing-analytics-toolkit
```

### Developer Installation:
```bash
git clone https://github.com/anilcogalan/advanced_marketing_tool.git
cd advanced_marketing_tool
pip install -e .
```

## 📖 Quick Start

### Customer Segmentation Example
```python
from marketing_analytics.models import AdvancedSegmentationModel
import pandas as pd

# Load data
data = pd.read_csv('customer_data.csv')

# Initialize model
model = AdvancedSegmentationModel(
    method='kmeans',
    n_segments=3,
    feature_selection=True
)

# Fit and analyze
segments = model.fit_predict(data)
profiles = model.get_segment_profiles(data)
recommendations = model.get_segment_recommendations(0, data)

print("Segment Profiles:", profiles)
print("Recommendations:", recommendations)
```

### Pricing Example
```python
from marketing_analytics.models import AdvancedPricingModel
import pandas as pd

# Load features
features = pd.read_csv('pricing_data.csv')

# Initialize model
pricing_model = AdvancedPricingModel(method='ml')

# Fit the model
pricing_model.fit(features, features['demand'])

# Predict optimal prices
optimal_prices = pricing_model.predict_optimal_price(features)
print("Optimal Prices:", optimal_prices)
```

## 📊 Visualization Tools

The library offers various visualization tools:

```python
from marketing_analytics.visualization import (
    plot_customer_segments,
    plot_channel_performance,
    plot_customer_journey
)

# Visualize customer segments
plot_customer_segments(segments_data)

# Visualize channel performance
plot_channel_performance(channel_data)
```

## 📚 Detailed Documentation

For more detailed information, please refer to our [documentation]("").

## 🤝 Contributing

To contribute to the project:

1. Fork this repository
2. Create a new branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push your branch (`git push origin feature/amazing-feature`)
5. Create a Pull Request

## 📝 License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## 📫 Contact

- Project Owner: [Anil Cogalan](mailto:anilcogalan@gmail.com)
- Twitter: [@anilcogalan](https://twitter.com/anilcogalan)
- LinkedIn: [Anil Cogalan](https://linkedin.com/in/anilcogalan)

## 🙏 Acknowledgments

Thanks to everyone who contributed to this project. For a complete list of contributors, see the [CONTRIBUTORS.md](CONTRIBUTORS.md) file.

## 📌 Citation

If you use this project in your academic work, please cite it as follows:

```bibtex
@software{marketing_analytics_toolkit,
  author = {Anil Cogalan},
  title = {Marketing Analytics Toolkit},
  year = {2024},
  publisher = {GitHub},
  url = {https://github.com/anilcogalan/advanced_marketing_tool}
}
```

