meridian.model.transformers.KpiTransformer

Contains forward and inverse KPI transformation methods.

Inherits From: TensorTransformer

This class stores coefficients to scale KPI, first by geo and then by mean and standard deviation of KPI.

kpi
A tensor of dimension (n_geos, n_times) containing the KPI data, used to compute the mean and stddev.
population
A tensor of dimension (n_geos,) containing the population of each geo, used to to compute the population scale factors.

population_scaled_mean

population_scaled_stdev

Methods

forward

View source

Scales a given tensor using the stored coefficients.

inverse

View source

Scales back a given tensor using the stored coefficients.

Design a Mobile Site
View Site in Mobile | Classic
Share by: