KL_plot {CytOpT}R Documentation

Kullback-Leibler divergence plot

Description

A plotting function for displaying Kullback-Liebler (KL) divergence across iterations of the optimization algorithm(s).

Usage

KL_plot(
  monitoring,
  n_0 = 10,
  n_stop = 1000,
  title = "Kullback-Liebler divergence trace"
)

Arguments

monitoring

list of monitoring estimates from CytOpt() output.

n_0

first iteration to plot. Default is 10.

n_stop

last iteration to plot. Default is 1000.

title

plot title. Default is "Kullback-Liebler divergence trace".

Value

a ggplot object

Examples


if(interactive()){

gold_standard_manual_prop <- c(table(HIPC_Stanford_1369_1A_labels) / 
 length(HIPC_Stanford_1369_1A_labels))
res <- CytOpT(X_s = HIPC_Stanford_1228_1A, X_t = HIPC_Stanford_1369_1A, 
             Lab_source = HIPC_Stanford_1228_1A_labels,
             theta_true = gold_standard_manual_prop,
             eps = 0.0001, lbd = 0.0001, n_iter = 10000, n_stoc=10,
             step_grad = 10, step = 5, power = 0.99, 
             method='both', monitoring = TRUE)
plot(res)

}

[Package CytOpT version 0.9.4 Index]