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

Description Usage Arguments Value

View source: R/prediction.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 = SimReg:::fg_step_tab_pp(N = length(y)),
  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 Feb. 15, 2021, 5:10 p.m.