Description Usage Arguments Details Value
View source: R/4viewpointregression.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  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,
"0viewpoints"), model_matrix_dir = file.path(parent_dir,
"2modelmatrix"), output_dir = file.path(parent_dir,
"3viewpointregression"))

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 permutationbased feature importances. 
perm_int_seed 
(Integer scalar) Random seed for the permutationbased feature importances. 
perm_int_reps 
(Integer scalar) Number of replicates for the permutationbased 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 alreadygenerated
output files from 
model_matrix_dir 
(Character scalar)
The directory for the alreadygenerated
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 "LBFGSB" 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.