mesmer.stats.LinearRegression.fit

mesmer.stats.LinearRegression.fit#

LinearRegression.fit(predictors, target, dim, weights=None, fit_intercept=True)#

Fit a linear model

Parameters:
  • predictors (dict of xr.DataArray) – A dict of DataArray objects used as predictors. Must be 1D and contain dim.

  • target (xr.DataArray) – Target DataArray. Must be 2D and contain dim.

  • dim (str) – Dimension along which to fit the polynomials.

  • weights (xr.DataArray, default: None.) – Individual weights for each sample. Must be 1D and contain dim.

  • fit_intercept (bool, default=True) – Whether to calculate the intercept for this model. If set to False, no intercept will be used in calculations (i.e. data is expected to be centered).