posterior_prediction: Predicted probability of 'y' given 'x' conditional on...

View source: R/prediction.R

posterior_predictionR Documentation

Predicted probability of y given x conditional on association and given data.

Description

Predicted probability of y given x conditional on association and given data.

Usage

posterior_prediction(
  ontology,
  x,
  y,
  sim_reg_out,
  x_new = x,
  information_content = get_term_info_content(ontology, x),
  sim_params = list(ontology = ontology, information_content = information_content),
  two_way = TRUE,
  prediction_fn = NULL,
  min_ratio = 0.001,
  ...
)

Arguments

ontology

ontology_index object.

x

list of character vectors of ontological terms.

y

logical response vector.

sim_reg_out

Object of class sim_reg_output.

x_new

New list of ontological term sets to perform prediction on. Defaults to x.

information_content

Numeric vector of information contents of terms named by term ID. Defaults to information content based on frequencies of annotation in x.

sim_params

List of arguments to pass to get_asym_sim_grid.

two_way

Boolean value determining whether to calculate semantic similarity ‘in both directions’ (i.e. compute s_x and s_phi or just s_phi).

prediction_fn

Function for computing predicted probabilities for y[i]=TRUE.

min_ratio

Threshold for fraction of posterior probability which sampled phi must hold in order to be included in sum.

...

Additional arguments to pass to prediction_fn.

Value

Vector of predicted probabilities corresponding to term sets in x_new.


SimReg documentation built on May 29, 2024, 8:40 a.m.