Getting started¶
Install¶
Install Meridian Studio from the Marketplace, or:
Cursor installs from Open VSX: install Meridian Studio from the Extensions view, or:
It needs VS Code 1.100 or later, and installs Red Hat's YAML extension with it: completion and errors in the YAML come through it.
A first model, on your CSV¶
Meridian takes one row per week (and per geo, in a geo model): the date, the KPI, then each channel's impressions
and spend, and the controls. Dates read yyyy-mm-dd.
- Open the folder holding your CSV, click the Meridian icon in the activity bar, then New dataset and pick
the CSV.
datasets/<name>.yamlopens, filled from the CSV as far as its content and column names allow: the dates astime, impressions paired with their spend into channels, the KPI and controls by name. Complete what is left in the YAML, where the CSV's columns are offered, or from the tree: Datasets. - New model on that dataset writes
models/<name>.yaml: Meridian'sModelSpec, priors, sampling. Click ▶ Fit above the file. The dataset's data checks run first; the fit then takes a few minutes on CPU, and its results open beside the editor: Models and fits. - New scenario on that model writes
scenarios/<name>.yaml: a budget, how far each channel may move. Click ▶ Optimize: Budget scenarios.
The project ends up as:
<project>/
data/national_media.csv your CSVs
datasets/synthetic.yaml which CSV, which columns, which channels
models/synthetic-v1.yaml
models/synthetic-v1.result.json the latest fit: quality, review, ROI per channel, where MLflow put the artifacts
models/synthetic-v1.runs.jsonl every fit, one line each
scenarios/plus-10.yaml
scenarios/plus-10.result.json spend and outcome per channel, before and after
scenarios/plus-10.html Meridian's optimization summary
mlflow.db, mlruns/ the local MLflow store, or with a server the copy of each fit's model, report and
health card (keep them out of git)
No CSV at hand?
The repository's examples/ folder is a
project on Meridian's simulated national data: a dataset, a model, a scenario. Open it and click ▶ Fit.
The first run¶
The first fit installs what it needs:
- uv if it is not on the machine, after asking: into the extension's own storage,
without changing your
PATH. - Python and Meridian (with TensorFlow), in the extension's folder: a few minutes and about 1 GB, once.
Fits run on your machine, on CPU, and log to an MLflow store in the project, unless meridian.mlflowTrackingUri
points to an MLflow server (settings).