LinearRegression.fit#

LinearRegression.fit(X, y, coords=None)#

Validate the outcome against the family support, then fit.

Parameters:
  • X (DataArray) – Input features as an xarray DataArray.

  • y (DataArray) – Target variable as an xarray DataArray. Bernoulli outcomes must be 0/1; Poisson and Negative Binomial outcomes must be finite, non-negative, and integer-valued.

  • coords (dict[str, Any] | None) – Dictionary with coordinate names for named dimensions.

Returns:

InferenceData object containing the samples.

Return type:

az.InferenceData