cellrank.ul.models.GAMR.fit

GAMR.fit(x=None, y=None, w=None, **kwargs)[source]

Fit the model.

Parameters
  • x (Optional[ndarray]) – Independent variables, array of shape (n_samples, 1). If None, use x.

  • y (Optional[ndarray]) – Dependent variables, array of shape (n_samples, 1). If None, use y.

  • w (Optional[ndarray]) – Optional weights of x, array of shape (n_samples,). If None, use w.

  • **kwargs – Keyword arguments for underlying model’s fitting function.

Returns

Fits the model and returns self. Updates the following fields by filtering out 0 weights w:

  • x - Filtered independent variables of shape (n_filtered_cells, 1) used for fitting.

  • y - Filtered dependent variables of shape (n_filtered_cells, 1) used for fitting.

  • w - Filtered weights of shape (n_filtered_cells,) used for fitting.

Return type

cellrank.ul.models.GAMR