View source on GitHub
|
A Processor for marketing reach and frequency optimization.
Inherits From: ModelProcessor
schema.processors.reach_frequency_optimization_processor.ReachFrequencyOptimizationProcessor(
trained_model: model_processor.ModelType
)
Methods
execute
execute(
specs: Sequence[schema.processors.reach_frequency_optimization_processor.ReachFrequencyOptimizationSpec]
) -> rf_pb.ReachFrequencyOptimization
Runs an analysis/optimization on the model using the given specs.
| Args | |
|---|---|
specs
|
Sequence of Specs containing parameters needed for the
analysis/optimization. The specs must all be of the same type as
self.spec_type() for this processor
|
| Returns | |
|---|---|
| A proto containing the results of the analysis/optimization. |
output_type
@classmethodoutput_type() -> type[rf_pb.ReachFrequencyOptimization]
Returns the concrete output type that this ModelProcessor produces.
spec_type
@classmethodspec_type() -> type[ReachFrequencyOptimizationSpec]
Returns the concrete Spec type that this ModelProcessor operates on.
__call__
__call__(
specs: Sequence[S], output: pb.Mmm
)
Runs an analysis/optimization on the model using the given specs.
This also sets the appropriate output field in the given MmmOutput proto.
| Args | |
|---|---|
specs
|
Sequence of Specs containing parameters needed for the
analysis/optimization. The specs must all be of the same type as
self.spec_type() for this processor
|
output
|
The output proto to which the results of the analysis/optimization should be attached. |
| Raises | |
|---|---|
ValueError
|
If any spec is not of the same type as self.spec_type().
|
View source on GitHub