Attribution Error in plotting media insights #16
mahewashabdi
started this conversation in
General
Replies: 1 comment 1 reply
-
Hello @mahewashabdi ! It looks like your target scaler has not been If you are not using a target scaling you dont need to pass it there, but if you are using it, make sure you are using it correctly and it has been fit before :) Let us know if that is the case or if its something else :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
I successfully ran the model. however while implementing the media insights, I am facing error.
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_29796\1575169758.py in
----> 1 plot.plot_response_curves(media_mix_model=mmm, media_scaler=media_scaler, target_scaler=target_scaler)
~\Anaconda3\envs\lightweightmmm\lib\site-packages\lightweight_mmm\plot.py in plot_response_curves(media_mix_model, media_scaler, target_scaler, prices, optimal_allocation_per_timeunit, steps, percentage_add, apply_log_scale, figure_size, n_columns, marker_size, legend_fontsize, seed)
225 media_ranges = jnp.squeeze(media_ranges)
226 if target_scaler:
--> 227 predictions = target_scaler.inverse_transform(predictions)
228
229 if media_scaler:
~\Anaconda3\envs\lightweightmmm\lib\site-packages\lightweight_mmm\preprocessing.py in inverse_transform(self, data)
154 Dataset with the inverse transformation applied.
155 """
--> 156 return self.divide_by * data / self.multiply_by
AttributeError: 'CustomScaler' object has no attribute 'divide_by
thanks,
Mahewash
Beta Was this translation helpful? Give feedback.
All reactions