We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi can someone help me with the below?
Thanks!
prices = jnp.ones(mmm.n_media_channels)
n_time_periods = 10 budget = jnp.sum(media_data.mean(axis=0))*n_time_periods extra_features_forecast = extra_features_scaler.transform(extra_features_test)[:n_time_periods]
solution = optimize_media.find_optimal_budgets( n_time_periods = n_time_periods, media_mix_model = mmm, extra_features=extra_features_forecast, budget=budget, prices=prices, media_scaler=media_scaler, target_scaler=target_scaler,)
for x in range(len(solution.x)): share=round(solution.x[x]/ jnp.sum(solution.x*prices)*100,2) print(channel_names[x],": ", share, "%")
solution
( message: Positive directional derivative for linesearch success: False status: 8 fun: -775541.283972166 x: [ 1.200e+01 1.200e+01 1.200e+01 1.200e+01 1.200e+01 1.200e+01 1.200e+01] nit: 5 jac: [-1.285e+04 -5.411e+03 -1.743e+04 -6.435e+04 -3.987e+03 -6.294e+03 -8.593e+02] nfev: 15 njev: 1, Array(-7.94672769e+10, dtype=float64), Array([1458417.2, 1458417.2, 1458417.2, 1458417.2, 1458417.2, 1458417.2, 1458417.2], dtype=float32))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi can someone help me with the below?
Thanks!
Budget Optimization
prices = jnp.ones(mmm.n_media_channels)
starting with the same average weekly budget
n_time_periods = 10
budget = jnp.sum(media_data.mean(axis=0))*n_time_periods
extra_features_forecast = extra_features_scaler.transform(extra_features_test)[:n_time_periods]
run budget optimization
solution = optimize_media.find_optimal_budgets(
n_time_periods = n_time_periods,
media_mix_model = mmm,
extra_features=extra_features_forecast,
budget=budget,
prices=prices,
media_scaler=media_scaler,
target_scaler=target_scaler,)
for x in range(len(solution.x)):
share=round(solution.x[x]/ jnp.sum(solution.x*prices)*100,2)
print(channel_names[x],": ", share, "%")
( message: Positive directional derivative for linesearch
success: False
status: 8
fun: -775541.283972166
x: [ 1.200e+01 1.200e+01 1.200e+01 1.200e+01 1.200e+01
1.200e+01 1.200e+01]
nit: 5
jac: [-1.285e+04 -5.411e+03 -1.743e+04 -6.435e+04 -3.987e+03
-6.294e+03 -8.593e+02]
nfev: 15
njev: 1,
Array(-7.94672769e+10, dtype=float64),
Array([1458417.2, 1458417.2, 1458417.2, 1458417.2, 1458417.2, 1458417.2,
1458417.2], dtype=float32))
The text was updated successfully, but these errors were encountered: