posterior_performance {hsstan}R Documentation

Posterior measures of performance

Description

Compute the log-likelihood and a relevant measure of performance (R-squared or AUC) from the posterior samples.

Usage

posterior_performance(
  obj,
  prob = 0.95,
  sub.idx = NULL,
  summary = TRUE,
  cores = getOption("mc.cores", 1)
)

Arguments

obj

An object of class hsstan or kfold.

prob

Width of the posterior interval (0.95, by default). It is ignored if summary=FALSE.

sub.idx

Vector of indices of observations in the dataset to be used in computing the performance measures. If NULL (default), all observations in the dataset are used.

summary

Whether a summary of the distribution of the performance measure should be returned rather than the pointwise values (TRUE by default).

cores

Number of cores to use for parallelization (the value of options("mc.cores") by default).

Value

The mean, standard deviation and posterior interval of the performance measure (R-squared or AUC) if summary=TRUE, or a vector of values of the performance measure with length equal to the size of the posterior sample if summary=FALSE. Attribute type reports whether the performance measures are cross-validated or not. If sub.idx is not NULL, attribute subset reports the index of observations used in the computations.

Examples



# continued from ?hsstan
posterior_performance(hs.biom, cores=1)



[Package hsstan version 0.8.2 Index]