# Input

![mmm_inputs.png](up2j5xTh2zNC)

In this flowzone, we load the input dataset and sync it into the project connection. For more details on the expected data schema, please refer to Meridian's documentation ([here](https://developers.google.com/meridian/docs/pre-modeling/collect-data))

# Preprocessing

![mmm_preprocessing.png](0O9JwWEChwV5)

In this flowzone, we perform some preprocessing on the input data to match our use case. In the example, we only filter regarding geos, but we could also rename columns, filter on dates, or change the time granularity with an aggregation step.

# Modeling

![mmm_modeling.png](Cp0tgc4HB6Ft)

Here, we create and train the meridian model based on our data. The selection of the data columns used and the configuration of the model and the training parameters are done in the code. You can find more information on the data loading [here](https://developers.google.com/meridian/docs/pre-modeling/collect-data) and about the model configuration [here](https://developers.google.com/meridian/notebook/meridian-getting-started#configure-model)

The project variables "min_date_eval_app" and "max_date_eval_app" lets you select the time period for the evaluation of the model and the budget optimization.

THe variables "spend_constraint_lower" and "spend_constraint_upper" specifier the lower and upper limits for the spending on each channel.

by defaut they are both as 0.3 (some the new spending after optimization of a channel will be between +30% and -30% of the current sending).

# Inference

![mmm_inference.png](Ohg69C6ryZZD)

Here, you can run the inference on your data using the parameters selected using the web app. You can also modify this if you want to use parameters manually.
