Skip to content

Update Bass notebook to use BassModel class #2590

@williambdean

Description

@williambdean

Update docs/source/notebooks/bass/bass_example.ipynb to showcase the new BassModel class.

Motivation

The current notebook uses create_bass_model directly. Since the refactor (#2584) added the BassModel(ModelBuilder) class as the recommended entry point, the notebook should demonstrate the class-based workflow.

Sections to update

  1. Import — Use from pymc_marketing.bass import BassModel as primary entry point
  2. Model creationBassModel(model_config=...) instead of separate priors dict
  3. Fittingmodel.fit(data=...) with data in various formats (array, DataFrame, xr.Dataset)
  4. Posterior analysis — Use model.idata directly with ArviZ
  5. Posterior predictivemodel.sample_posterior_predictive(X=future) for forecasting
  6. Save/Loadmodel.save() / BassModel.load() round-trip
  7. Plottingmodel.plot_* methods (once # is complete)
  8. MLflowpymc_marketing.mlflow.autolog(log_bass=True) (once MLflow integration for BassModel #2588 is complete)

Notes

  • Keep the existing simulation + multi-product structure — it's a good demo
  • Replace pm.sample calls with model.fit where possible
  • The create_bass_model function should still be mentioned as a lower-level alternative

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bass modelDealing with the Bass Defusion modeldocsImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions