View source on GitHub
|
Contains forward and inverse KPI transformation methods.
Inherits From: TensorTransformer
meridian.model.transformers.KpiTransformer(
kpi: meridian.backend.Tensor,
population: meridian.backend.Tensor
)
This class stores coefficients to scale KPI, first by geo and then by mean and standard deviation of KPI.
Attributes | |
|---|---|
population_scaled_kpi
|
|
population_scaled_mean
|
|
population_scaled_stdev
|
|
Methods
forward
forward(
tensor: meridian.backend.Tensor
) -> meridian.backend.Tensor
Scales a given tensor using the stored coefficients.
inverse
inverse(
tensor: meridian.backend.Tensor
) -> meridian.backend.Tensor
Scales back a given tensor using the stored coefficients.
View source on GitHub