facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.16k stars 344 forks source link

generated base_visualizer and allocator_plotter using ai-codegen #1114

Closed Marco-Premier closed 2 weeks ago

Marco-Premier commented 2 weeks ago

Project Robyn

Type of change

alxlyj commented 2 weeks ago

I made some changes here and also address the failing unit test checks as part of the github workflow. I haven't included save_plot().


- Using parent's helper methods 

def plot_spend_allocation(self) -> plt.Figure: fig, ax = self.create_figure() # Uses parent's figure creation


- Using parent's color scheme

color=self.colors["positive"] # Uses parent's color definitions color=self.colors["negative"] color=self.colors["current"]


- Using parent's styling constants:

fontsize=self.font_sizes["annotation"] alpha=self.alpha["primary"]


- Cleanup inheritance:

def cleanup(self) -> None: super().cleanup() # Calls parent's cleanup