
Add interactions to a trajectory model
add_interactions.Rd
This function adds significant interactions to a given trajectory model if they do not already exist. It identifies significant interactions based on the provided threshold and updates the model features with logistic features derived from these interactions. The trajectory model is then re-learned with the new features.
Usage
add_interactions(
traj_model,
interaction_threshold = 0.001,
max_motif_n = NULL,
max_add_n = NULL,
max_n = NULL,
lambda = 0.00001,
alpha = 1,
seed = 60427,
interactions = NULL,
ignore_feats = c("TT", "CT", "GT", "AT", "TC", "CC", "GC", "AC", "TG", "CG", "GG",
"AG", "TA", "CA", "GA", "AA")
)
Arguments
- interaction_threshold
threshold for the selecting features to create interactions. IQ learns a linear model on the features and selects the features with coefficients above this threshold. Default: 0.001
- max_motif_n
maximum number of motifs to consider for interactions. If NULL, all motifs above the interaction_threshold will be considered. Default: NULL
- max_add_n
maximum number of additional features to consider for interactions. If NULL, all additional features above the interaction_threshold will be considered. Default: NULL
- max_n
maximum number of interactions to consider. If NULL, all interactions will be considered. If set, the interactions will be selected based on correlation with the signal in the training data. Default: NULL
- seed
random seed for reproducibility.
- interactions
A precomputed interaction matrix. If provided, the function will not compute the interactions. Default: NULL
- ignore_feats
A character vector of features to ignore when creating interactions. Default: dinucleotides