Find optimal directional connections from fitted RF models
Source:R/findConnection.R
find_connection.RdScores each directional RF model using modularity of the diagonal-adjusted
forest weight
matrix (and optionally OOB normalized MSE). Two-step selection:
(1) drop the bottom drop_bottom_q fraction of connections by
rank-sum of quality metrics;
(2) select_one_per_pair keeps at most one direction per omics pair
(lowest rank-sum).
Usage
find_connection(
mod.list,
return_score = FALSE,
drop_bottom_q = 0.2,
select_one_per_pair = TRUE,
compute_oob = FALSE,
seed = 529L,
...
)Arguments
- mod.list
A named list of fitted RF models. Model names must follow
response_predictorconvention.- return_score
Logical; whether to return the directional score matrix.
- drop_bottom_q
Proportion of models to drop based on quality rank-sum. Must be in
[0, 1). Default is0.2.- select_one_per_pair
Logical; whether to keep at most one direction per omics pair among quality-filtered models.
- compute_oob
Logical; whether to compute OOB normalized MSE in addition to modularity. When
TRUE,quality_score = modularity - oob_nmseand rank-sum uses both ranks; whenFALSE,quality_score = modularityandrank_sum = rank(-modularity). Default isFALSE.- seed
Random seed used by Louvain modularity scoring.
- ...
Additional arguments (currently ignored).