innovate.compete.competition module

class innovate.compete.competition.MultiProductDiffusionModel(p: Sequence[float], Q: Sequence[Sequence[float]], m: Sequence[float], names: Sequence[str] = None)[source]

Bases: DiffusionModel

Generic framework for multi-product/policy diffusion with competition and substitution.

bounds(t: Sequence[float], y: Sequence[float]) Dict[str, tuple][source]

Returns bounds for the model parameters.

static differential_equation(y, t, params)[source]

Differential equations for the multi-product model.

fit(t: Sequence[float], y: Sequence[Sequence[float]], **kwargs) Self[source]

Fit model parameters by minimizing squared prediction error.

initial_guesses(t: Sequence[float], y: Sequence[float]) Dict[str, float][source]

Returns initial guesses for the model parameters.

property param_names: Sequence[str]

Returns the names of the model parameters.

property params_: Dict[str, float | List[float] | List[List[float]]]

Returns a dictionary of fitted model parameters.

predict(t: Sequence[float]) DataFrame[source]

Predicts adoption levels for given time points.

predict_adoption_rate(t: Sequence[float]) Sequence[float][source]

Predicts the rate of adoption (new adoptions per unit of time).

score(t: Sequence[float], y: DataFrame) float[source]

Returns the R^2 score of the model fit.