Skip to main content

Exploratory data analysis and transformation toolkit for Marketing Mix Modeling (MMM)

Project description

๐Ÿฆ‰ Owl Mix

Owl Mix is a Python package designed for data transformation and exploratory data analysis (EDA), specifically tailored for Marketing Mix Modeling (MMM) workflows.

It helps data scientists and analysts:

  • Transform raw marketing data into model-ready features
  • Perform structured exploratory analysis
  • Understand relationships between media variables and target outcomes

๐Ÿš€ Key Features

๐Ÿ”„ Transformations (MMM-ready)

  • Lag creation
  • Adstock (carryover effects)
  • Saturation (diminishing returns)
  • Pipeline-based transformation workflow

๐Ÿ“Š Exploratory Data Analysis

  • Dataset summary (missing values, types, stats)
  • Correlation analysis
  • Lag correlation with target variable
  • Exportable text reports

๐Ÿงฑ Modular Design

  • Clean and extensible architecture
  • Easily add custom transformations and EDA components

๐Ÿ“ฆ Installation

pip install owl-mix

Then import in Python:

import owlmix

โšก Quick Example

from owlmix.transform.pipeline import TransformPipeline
from owlmix.eda import EDAAnalyzer
from owlmix.utils.cleanup import final_cleanup
 
# Step 1: Transform data
pipeline = TransformPipeline()
 
pipeline.add_lag("tv_spend", lag=1)
pipeline.add_adstock("tv_spend", decay=0.5)
pipeline.add_saturation("tv_spend", method="hill", k=100, s=2)
 
df_transformed = pipeline.run(df)
 
# Step 2: Cleanup
df_clean = final_cleanup(df_transformed)
 
# Step 3: EDA
eda = EDAAnalyzer(df_clean, target="sales")
 
print(eda.basic_stats())
print(eda.correlation())
 
report = eda.summary()
 
with open("eda_report.txt", "w") as f:
    f.write(report)

๐Ÿ“ Project Structure

owlmix/
โ”‚
โ”œโ”€โ”€ eda/
โ”‚   โ”œโ”€โ”€ analyzer.py
โ”‚   โ”œโ”€โ”€ stats.py
โ”‚   โ”œโ”€โ”€ correlation.py
โ”‚   โ”œโ”€โ”€ summary.py
โ”‚
โ”œโ”€โ”€ transform/
โ”‚   โ”œโ”€โ”€ pipeline.py
โ”‚   โ”œโ”€โ”€ lag.py
โ”‚   โ”œโ”€โ”€ adstock.py
โ”‚   โ”œโ”€โ”€ saturation.py
โ”‚
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ cleanup.py
โ”‚
examples/
docs/

๐Ÿ“š Documentation

Detailed documentation is available in the docs/ folder:

  • docs/eda.md โ†’ EDA module
  • docs/transform.md โ†’ Transformation pipeline
  • docs/saturation.md โ†’ Saturation methods

๐Ÿงช Examples

Ready-to-run examples are available in the examples/ folder:

  • eda_basic.py
  • eda_full_workflow.py
  • transform_pipeline_example.py
  • mmm_workflow_example.py โญ

๐Ÿง  Use Case: Marketing Mix Modeling (MMM)

Owl Mix is particularly useful for:

  • Preprocessing marketing data
  • Feature engineering for MMM
  • Understanding lagged media effects
  • Generating EDA reports before modeling

๐Ÿ”ง Roadmap

Planned enhancements:

  • Visualization support (plots, heatmaps)
  • HTML report generation
  • Automated MMM diagnostics
  • CLI support

๐Ÿค Contributing

Contributions are welcome!

Feel free to:

  • Open issues
  • Suggest features
  • Submit pull requests

๐Ÿ“„ License

This project is licensed under the MIT License.


โญ Support

If you find this project useful, consider giving it a star โญ on GitHub!

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

owl_mix-0.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owl_mix-0.1.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file owl_mix-0.1.1.tar.gz.

File metadata

  • Download URL: owl_mix-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for owl_mix-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7dcc60211cd846bbe979c7b8a29bb54c0e33da605e3c3e6acc0c86b701e76f88
MD5 6cdf3bc00f441a35b0fd9afd1d5a04ac
BLAKE2b-256 44ec57cac6ae8de3e4438968dd327da16727539ac2d8b9de0a92c52cb1de8f50

See more details on using hashes here.

File details

Details for the file owl_mix-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: owl_mix-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for owl_mix-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86f4745fa049ae8cee38f4ea402e752f4d996999b2b43fcc391f75fcb3c31bb1
MD5 87111cf898801558cb147371f0a78d68
BLAKE2b-256 93f09b55e83b6b0029179f30910f2a09f50221edef92ab52b15d6fea44d13c47

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