
Relearn Trajectory Model
relearn_traj_model.RdThis function relearns a trajectory model using the glmnet package, without re-inferring the motif models.
Usage
relearn_traj_model(
traj_model,
new_energies = FALSE,
new_logist = FALSE,
lambda = NULL,
use_additional_features = TRUE,
use_motifs = TRUE,
verbose = FALSE,
rescale_pred = TRUE,
relearn_model = TRUE,
family = "binomial",
new_interactions = FALSE,
max_n_interactions = NULL,
use_cv = FALSE,
nfolds = 10,
interaction_scale_factor = 1,
logist_interactions = FALSE,
logist_dinucs = FALSE,
new_score = NULL
)Arguments
- traj_model
The trajectory model object.
- new_energies
If TRUE - recreate the energies. Default is FALSE.
- new_logist
If TRUE - recreate the logistic features. Default is FALSE. If
new_energiesis TRUE, this is automatically set to TRUE.- lambda
The lambda value to use for relearning. If NULL, the lambda value from the trajectory model is used.
- use_additional_features
A logical value indicating whether to use additional features. Default is TRUE.
- use_motifs
A logical value indicating whether to use motif models. Default is TRUE.
- verbose
Logical indicating whether to display additional information.
- rescale_pred
Logical indicating whether to rescale the predicted values. Default is TRUE.
- relearn_model
Logical indicating whether to relearn the model. Default is TRUE.
- family
The family to use for the glmnet model. Either "binomial" (default) or "gaussian" for linear regression.
- new_interactions
Logical indicating whether to add new interactions. Default is FALSE.
- max_n_interactions
The maximum number of interactions to add. Default is NULL.
- use_cv
Logical indicating whether to use cross-validation for lambda selection. Default is FALSE.
- nfolds
Number of folds for cross-validation. Default is 10.
- interaction_scale_factor
The factor to scale the interactions by. Default is 1 (no scaling).
- logist_interactions
Logical indicating whether to transform interactions to logistic functions. Default is FALSE.
- logist_dinucs
Logical indicating whether to transform dinucleotides to logistic functions. Default is FALSE.
- new_score
A vector of new scores to use for the model. If NULL, the diff_score is used. Default is NULL. If the vector is named, the names should be the same as the peak names in the trajectory model.