create_m_and_L_recommendations#

pymc_marketing.mmm.hsgp.create_m_and_L_recommendations(X, X_mid, ls_lower=1.0, ls_upper=None, cov_func=CovFunc.ExpQuad)[source]#

Create recommendations for the number of basis functions based on the data.

Parameters:
  • X (ndarray) – The data.

  • X_mid (float) – The mean of the data.

  • ls_lower (float) – Lower bound for the lengthscale. Default is 1.0.

  • ls_upper (float | None) – Upper bound for the lengthscale. Default is None.

  • cov_func (CovFunc) – The covariance function. Default is CovFunc.ExpQuad.

Return type:

tuple[int, float]

Returns:

The number of basis functions and the boundary of the approximation.