zoom.pls_tool.run_component_eval
- zoom.pls_tool.run_component_eval(expression: pandas.DataFrame, SBP: pandas.DataFrame, ncomps: numpy.ndarray | list, cv: int, seed: int, repeats: int) int[source]
Evaluate optimal component for PLS-R through cross-validation strategy.
- Parameters:
expression (pd.DataFrame) – AHBA gene expression matrix.
SBP (pd.DataFrame) – One-dimensional data frame of spatial brain phenotype.
ncomps (np.ndarray or list) – Optimal component number candidates.
cv (int) – Number of folds in cross-validation.
seed (int) – Random seed to control the dataset split.
repeats (int) – How many times should optimal component evaluation be run?
- Returns:
best_comp – The optimal component number for current PLS-R model.
- Return type:
int
References
Wang, Y. et al. Spatio-molecular profiles shape the human cerebellar hierarchy along the sensorimotor-association axis. Cell Rep. 43, 113770 (2024).