Skip to content

Commit 67f489e

Browse files
viktoriiasThe Meridian Authors
authored andcommitted
Remove the Meridian model from OptimizationResults.
PiperOrigin-RevId: 885714118
1 parent a60be99 commit 67f489e

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

meridian/analysis/optimizer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,6 @@ class OptimizationResults:
471471
mROI, incremental outcome, CPIK, and effectiveness.
472472
473473
Attributes:
474-
meridian: The fitted Meridian model that was used to create this budget
475-
allocation.
476474
analyzer: The analyzer bound to the model above.
477475
spend_ratio: The spend ratio used to scale the non-optimized performance
478476
metrics to the optimized performance metrics.
@@ -490,8 +488,7 @@ class OptimizationResults:
490488
budget allocation.
491489
"""
492490

493-
meridian: model.Meridian
494-
# The analyzer bound to the model above.
491+
# The analyzer bound to the model.
495492
analyzer: analyzer_module.Analyzer
496493
spend_ratio: np.ndarray # spend / historical spend
497494
spend_bounds: tuple[np.ndarray, np.ndarray]
@@ -1747,7 +1744,6 @@ def optimize(
17471744

17481745
return OptimizationResults(
17491746
new_data=new_data,
1750-
meridian=self._meridian,
17511747
analyzer=self._analyzer,
17521748
spend_ratio=spend_ratio,
17531749
spend_bounds=spend_bounds,

meridian/analysis/optimizer_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,7 +3267,6 @@ def setUp(self):
32673267
self.sample_optimized_data = _get_sample_optimized_data(is_revenue_kpi=True)
32683268

32693269
self.optimization_results = optimizer.OptimizationResults(
3270-
meridian=self.budget_optimizer._meridian,
32713270
analyzer=self.budget_optimizer._analyzer,
32723271
spend_ratio=np.array([1.0, 1.0, 1.0]),
32733272
spend_bounds=(
@@ -4045,7 +4044,6 @@ def setUp(self):
40454044
)
40464045

40474046
self.optimization_results = optimizer.OptimizationResults(
4048-
meridian=self.budget_optimizer._meridian,
40494047
analyzer=self.budget_optimizer._analyzer,
40504048
spend_ratio=np.array([1.0, 1.0, 1.0]),
40514049
spend_bounds=(np.array([0.7]), np.array([1.3])),
@@ -4055,7 +4053,6 @@ def setUp(self):
40554053
_optimization_grid=self.optimization_grid,
40564054
)
40574055
self.optimization_results_kpi_output = optimizer.OptimizationResults(
4058-
meridian=self.budget_optimizer_kpi_output._meridian,
40594056
analyzer=self.budget_optimizer_kpi_output._analyzer,
40604057
spend_ratio=np.array([1.0, 1.0, 1.0]),
40614058
spend_bounds=(np.array([0.7]), np.array([1.3])),

0 commit comments

Comments
 (0)