I just realised that the below will never be equal to the budget to allocate because the budget is scaled using the max channel transformer scaler self.channel_transformer["scaler"].scale_.max()
So if we want to get the re-scaled allocated budget from self.optimal_allocation_dict we need to use the same scaler. Note the extra .max() below
allocate_spend = (
np.array(list(mmm.optimal_allocation_dict.values()))
* mmm.channel_transformer["scaler"].scale_.max()
)