Skip to content

CLI Reference

mmm-eval provides a command-line interface (CLI) for running MMM evaluations. This guide covers all available options and usage patterns.

Basic Usage

Command Structure

mmm-eval [OPTIONS] --input-data-path PATH --framework FRAMEWORK --config-path PATH --output-path PATH

Required Arguments

  • --input-data-path: Path to your input data file (CSV or Parquet)
  • --framework: MMM framework to use (pymc-marketing or meridian)
  • --config-path: Path to your configuration file (JSON)
  • --output-path: Directory where results will be saved

Example Commands

# Basic evaluation
mmm-eval --input-data-path data.csv --framework pymc-marketing --config-path config.json --output-path results/

# Run specific tests only
mmm-eval --input-data-path data.csv --framework pymc-marketing --config-path config.json --output-path results/ --test-names accuracy cross_validation

Command Options

Input Options

  • --input-data-path: Path to input data file (required)
  • --config-path: Path to configuration file (required)
  • --framework: MMM framework to use (required)
  • Options: pymc-marketing, meridian

Output Options

  • --output-path: Directory for output files (required)
  • --test-names: Specific tests to run (optional)
  • Options: accuracy, cross_validation, refresh_stability, performance
  • Default: All tests

Advanced Options

  • --random-seed: Random seed for reproducibility (optional)
  • --verbose: Enable verbose output (optional)
  • --help: Show help message

Examples

Basic Evaluation

mmm-eval \
  --input-data-path data.csv \
  --framework pymc-marketing \
  --config-path config.json \
  --output-path results/

Run Specific Tests

mmm-eval \
  --input-data-path data.csv \
  --framework pymc-marketing \
  --config-path config.json \
  --output-path results/ \
  --test-names accuracy cross_validation

With Custom Random Seed

mmm-eval \
  --input-data-path data.csv \
  --framework pymc-marketing \
  --config-path config.json \
  --output-path results/ \
  --random-seed 42

Verbose Output

mmm-eval \
  --input-data-path data.csv \
  --framework pymc-marketing \
  --config-path config.json \
  --output-path results/ \
  --verbose

Output Structure

The CLI creates the following output structure:

results/
├── accuracy/
│   ├── metrics.json
│   └── plots/
├── cross_validation/
│   ├── metrics.json
│   └── plots/
├── refresh_stability/
│   ├── metrics.json
│   └── plots/
├── performance/
│   ├── metrics.json
│   └── plots/
└── summary.json

Error Handling

Common Errors

  1. File not found: Ensure all file paths are correct
  2. Invalid configuration: Check your config file format
  3. Framework not supported: Verify framework name
  4. Data format issues: Check data requirements

Getting Help

# Show help
mmm-eval --help

# Show version
mmm-eval --version

Next Steps