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.3.tar.gz (20.9 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.3-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: owl_mix-0.1.3.tar.gz
  • Upload date:
  • Size: 20.9 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.3.tar.gz
Algorithm Hash digest
SHA256 aba6e4ea44061c7cd4a9c195e67f8946c87e4c1411949740ff051c56bd4ea95e
MD5 f439bb39f63f2de9223ef44f9874c26c
BLAKE2b-256 fe335674a80a48c8f1c97da280c5b9f418c524c4d53da24847008c239a704059

See more details on using hashes here.

File details

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

File metadata

  • Download URL: owl_mix-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 29.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 808521f8aa7affe4ba553794d7fbdd61e901a039aae5c1afd06e4efee11a2125
MD5 9f3c2c1a0c9d4bb1d402f292f4c3f7e4
BLAKE2b-256 4ceca293a04fa5f5a69d5a67a703f82c30787b2fae743994246f6713b4c65cc8

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