GenerateEntryWiseFigures {PressPurt} | R Documentation |
Generate Entry Wise Figures
Description
This function plots the number of mis-predictions versus perturbation value, overlaid with distribution over stable perturbation values. Run after ComputeEntryWisePerturbationExpectation()
Usage
GenerateEntryWiseFigures(
input_folder = NULL,
EntryWise = NULL,
prefix = NULL,
all_numswitch_plots = FALSE,
list_of_numswitch_to_plot = NULL
)
Arguments
input_folder |
Input folder. The location of the files created by PreprocessMatrix if you specified an output_folder. This is also where the num switch array was saved. Must specify an input_folder OR EntryWise object. Default: NULL |
EntryWise |
Object where the ComputeEntryWisePerturbationExpectation output was saved. |
prefix |
Prefix of output files, if you so choose. |
all_numswitch_plots |
set to TRUE if you ant to plot all num switch plots (potentially very large). Default: FALSE |
list_of_numswitch_to_plot |
List of entries you want visualized with num switch. Should be a list of vectors. Example: list(c(0, 0), c(0, 1)) |
Value
plot or plots
Examples
## Not run:
# Set input file
infile <- system.file("extdata", "Modules", "IGP.csv",
package = "PressPurt")
# Preprocess the matrix
PreProsMatrix <- PreprocessMatrix(input_file = infile,
output_folder = NULL, max_bound = 10, threads = 2)
# Run ComputeEntryWisePerturbationExpectation
Entrywise <- ComputeEntryWisePerturbationExpectation(PreProsMatrix = PreProsMatrix,
distribution_type = "truncnorm",
input_a = 0, input_b = -2, threads = 1)
# Plot specific entries using entrywise object
list_of_numswitch_to_plot <- list(c(1, 1), c(1, 2))
GenerateEntryWiseFigures(EntryWise=Entrywise,
all_numswitch_plots = FALSE,
list_of_numswitch_to_plot=list_of_numswitch_to_plot)
# Plot specific entries from folder
GenerateEntryWiseFigures(input_folder = "test_r/test3",
all_numswitch_plots = FALSE,
list_of_numswitch_to_plot=list_of_numswitch_to_plot)
# Plot all numswitch plots
GenerateEntryWiseFigures(EntryWise=Entrywise,
all_numswitch_plots = TRUE)
## End(Not run)
[Package PressPurt version 1.0.2 Index]