cellrank.ul.models.FittedModel¶
-
class
cellrank.ul.models.
FittedModel
(x_test, y_test, conf_int=None, x_all=None, y_all=None, w_all=None)[source]¶ Class representing an already fitted model. Useful when the smoothed gene expression was computed externally.
- Parameters
x_test¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
]) – Independent variables of shape (n_samples, 1) used for prediction.y_test¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
]) – Prediction values of shape (n_samples,) forx_test
.conf_int¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
,None
]) – Array of shape (n_samples, 2) containing the lower and upper bounds of the confidence interval. If None, always setconf_int=False
incellrank.ul.models.BaseModel.plot()
.x_all¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
,None
]) – Unfiltered independent variables of shape (n_cells, 1). If None, always setshide_cells=True
incellrank.ul.models.BaseModel.plot()
.y_all¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
,None
]) – Unfiltered dependent variables of shape (n_cells, 1). If None, always sets hide_cells=True` incellrank.ul.models.BaseModel.plot()
.w_all¶ (
Union
[ndarray
,spmatrix
,List
,Tuple
,None
]) – Unfiltered weights of shape (n_cells,). If None andx_all
andy_all
are present, it will be set an array of 1.
Attributes
Annotated data object.
Array of shape (n_samples, 2) containing the lower and upper bounds of the confidence interval.
The underlying model.
Whether the model is prepared for fitting.
Filtered weights of shape (n_filtered_cells,) used for fitting.
Unfiltered weights of shape (n_cells,).
Filtered independent variables of shape (n_filtered_cells, 1) used for fitting.
Unfiltered independent variables of shape (n_cells, 1).
Filtered independent variables used when calculating default confidence interval, usually same as
x
.Independent variables of shape (n_samples, 1) used for prediction.
Filtered dependent variables of shape (n_filtered_cells, 1) used for fitting.
Unfiltered dependent variables of shape (n_cells, 1).
Filtered dependent variables used when calculating default confidence interval, usually same as
y
.Prediction values of shape (n_samples,) for
x_test
.Methods
confidence_interval
([x_test])Array of shape (n_samples, 2) containing the lower and upper bounds of the confidence interval.
copy
()Return a copy of self.
default_confidence_interval
([x_test])Array of shape (n_samples, 2) containing the lower and upper bounds of the confidence interval.
fit
([x, y, w])Do nothing and return self.
from_model
(model)Create a
cellrank.ul.models.FittedModel
instance fromcellrank.ul.models.BaseModel
.plot
([figsize, same_plot, hide_cells, perc, …])Plot the smoothed gene expression.
predict
([x_test, key_added])Prediction values of shape (n_samples,) for
x_test
.prepare
(*_args, **_kwargs)Do nothing and return self.
read
(fname)Deserialize self from a file.
write
(fname[, ext])Serialize self to a file.