Description Usage Arguments Details Value
View source: R/4-viewpoint-regression.R
Fits a viewpoint regression model. The following routines must be run first:
compute_viewpoints
compute_ppm_analyses
compute_model_matrix
1 2 3 4 5 6 7 8 9 10 11 | viewpoint_regression(
parent_dir,
max_iter = 500,
perm_int = TRUE,
perm_int_seed = 1,
perm_int_reps = 5,
allow_negative_weights = FALSE,
viewpoint_dir = file.path(parent_dir, "0-viewpoints"),
model_matrix_dir = file.path(parent_dir, "2-model-matrix"),
output_dir = file.path(parent_dir, "3-viewpoint-regression")
)
|
parent_dir |
(Character scalar)
The parent directory for the output files, shared with functions such as
|
max_iter |
(Integer scalar) Maximum number of iterations for the optimisation routine. |
perm_int |
(Logical scalar) Whether to compute permutation-based feature importances. |
perm_int_seed |
(Integer scalar) Random seed for the permutation-based feature importances. |
perm_int_reps |
(Integer scalar) Number of replicates for the permutation-based feature importances (the final estimates are averages over these replicates). |
allow_negative_weights |
(Logical scalar)
Whether negative weights should be allowed for discrete features
( |
viewpoint_dir |
(Character scalar)
The directory for the already-generated
output files from |
model_matrix_dir |
(Character scalar)
The directory for the already-generated
output files from |
output_dir |
(Character scalar) The output directory for the new results. Will be created if it doesn't exist already. |
The optimisation method is "BFGS" if allow_negative_weights
is TRUE
and "L-BFGS-B" otherwise (see optim
).
The primary output is a viewpoint regression model object
written to disk in the dir
directory.
This object contains the fitted viewpoint regression weights
and feature importance analyses.
Various plots may be constructed from this object:
plot_costs
plot_perm_int
plot_marginals
plot_discrete_weights
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.