Prepare the model to be ready for fitting. This also removes the zero and negative weights and prepares the design matrix.
gene¶ – Gene in
lineage¶ – Name of a lineage in
.obsm[lineage_key]. If None, all weights will be set to 1.
backward¶ – Direction of the process.
Specify start and end times:
data_key¶ – Key in
.layersor ‘X’ for
use_raw=True, it’s always set to ‘X’.
time_key¶ – Key in
.obswhere the pseudotime is stored.
use_raw¶ – Whether to access
threshold¶ – Consider only cells with weights >
thresholdwhen estimating the test endpoint. If None, use the median of the weights.
filter_cells¶ – Filter out all cells with expression values lower than this threshold.
n_test_points¶ – Number of test points. If None, use the original points based on
Nothing, but updates the following fields:
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.
x_all- Unfiltered independent variables of shape (n_cells, 1).
y_all- Unfiltered dependent variables of shape (n_cells, 1).
w_all- Unfiltered weights of shape (n_cells,).
x_test- Independent variables of shape (n_samples, 1) used for prediction.
prepared- Whether the model is prepared for fitting.
- Return type