Run the Ordinal SuStaIn algorithm (OSA) or load results from presaved .rds file if available
Source:R/run_and_save_OSA.R
run_and_save_OSA.RdRun the Ordinal SuStaIn algorithm (OSA) or load results from presaved .rds file if available
Usage
run_and_save_OSA(
dataset_name,
output_folder,
verbose = TRUE,
N_S_max,
rerun = FALSE,
rda_filename = "data.RData",
...
)Arguments
- dataset_name
for naming pickle files
- output_folder
where to save pickle files, etc.
- verbose
logical()indicating whether to print debugging information- N_S_max
maximum number of subtypes, should be 1 or more
- rerun
whether to force a rerun of the python code
- rda_filename
name of rda file containing environment used to run analyses
- ...
Arguments passed on to
run_OSAprob_scorearray probability of each score for all subjects across all biomarkers
dim = number of subjects x number of biomarkers x number of scores
score_valsa matrix specifying the scores for each biomarker
dim: number of biomarkers x number of scores
SuStaInLabelsthe names of the biomarkers as a list of strings
N_startpointsnumber of startpoints to use in maximum likelihood step of SuStaIn, typically 25
N_iterations_MCMCnumber of MCMC iterations, typically 1e5 or 1e6 but can be lower for debugging
use_parallel_startpointsboolean for whether or not to parallelize the maximum likelihood loop
seedrandom number seed for python code
plotlogical()indicating whether to construct PVD plots via python subroutinesN_CV_foldsnumber of cross-validation folds to create
patient_datapatient biomarker data
CV_fold_numswhich CV folds to run (for parallel processing)
keep_datalogical()indicating whether to include the ata in the return objectfig_sizepython figure size, in inches (width, height)
prob_correctthe probability of correctly classifying the underlying biomarker level: p(obs = true)
biomarker_levelsa list containing the levels for each biomarker
Value
a list()