Skip to content

Add another model internals to the streamlit app #1384

Open
@wd60622

Description

How about adding GPs and Fourier transformation pages to the streamlit app?

Would just have to be small wrappers around the components that exist

from pymc_marketing.prior import Prior
from pymc_marketing.mmm import YearlyFourier

# User input
n_order = 6
b = 0.1

# Setup
prior = Prior("Laplace", mu=0, b=b, dims="fourier")
fourier = YearlyFourier(n_order=n_order, prior=prior)

# Displayed in the APP
parameters = fourier.sample_prior()
curve = fourier.sample_curve(parameters)
fig, axes = fourier.plot_curve(curve)

Same thing in the GP case:

  • Limit the user input for display purposes but provide some
    Maybe the parameters here:
    eta_mass: float = 0.05,
    eta_upper: float = 1.0,
    ls_lower: float = 1.0,
    ls_upper: float | None = None,
    ls_mass: float = 0.9,
    cov_func: CovFunc = CovFunc.ExpQuad,
    centered: bool = False,
    drop_first: bool = True,
  • Sample the curve and plot it in the UI

This would be on a separate tab and would just have some surrounding context between the page. Doesn't have to be too complicated

Thoughts? @juanitorduz @cetagostini @louismagowan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    MMMdocsImprovements or additions to documentationstreamlit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions