generate_ROC_with_coned_directions: This function generates an ROC curve using the cone...

View source: R/roc_curve_simulation.R

generate_ROC_with_coned_directionsR Documentation

This function generates an ROC curve using the cone reconstruction idea.

Description

The set of directions that we choose are grouped into cones, the centers of which are random. To select the vertices that are the output of the reconstruction process, we consider evidence restricted only to the cones. For each cone of directions, take all the vertices whose projections onto each of these directions in the cone are selected by the GPC/RATE procedure. Now take the union of such vertices, over all the cones in our set of directions.

For the actual ROC idea: we start with the RATE Values for each feature, and vary the threshold 1/p at which to consider the RATE values significant. Consider a threshold t, and the set of all features whose rate values are above this threshold. For this collection of features, do the cone reconstruction process outlined above to obtain a collection of vertices, which we consider to be 'positive'. Those that aren't selected are the 'negative' ones. We regard a vertex to be a True Positive if it is within some small distance of a causal point, and conversely with a False Positive. True Negative and False Negative vertices are defined similarly.

Usage

generate_ROC_with_coned_directions(
  nsim = 10,
  curve_length = 25,
  grid_size = 25,
  distance_to_causal_point = 0.1,
  causal_points = 10,
  shared_points = 3,
  num_cones = 5,
  eta = 0.1,
  num_cusps = 10,
  truncated = 300,
  two_curves = TRUE,
  ball = TRUE,
  ball_radius = 2.5,
  type = "vertex",
  min_points = 3,
  directions_per_cone = 4,
  cap_radius = 0.15,
  radius = 0,
  ec_type = "ECT",
  mode = "sphere",
  subdivision = 3,
  num_causal_region = 5,
  num_shared_region = 5,
  alpha = 0.5,
  reduce = max,
  write = FALSE,
  workdir = "~/Documents/spheres"
)

Arguments

nsim

(int) : The number of replicates of data.

curve_length

(int) : Number of sub-level sets in each EC computation.

grid_size

(int) : The fine-ness/granularity of the interpolated shapes.

distance_to_causal_point

(float) : For interpolated shapes, the distance from a vertex to the causal points to be considered a "causal vertex"

causal_points

(int) : The number of causal points in each causal cusp, or number of causal points used for interpolations.

shared_points

(int) : The number of shared points in the shared cusps, or the number of shared points in the interpolations.

num_cones

(int): The number of cones to compute the (S/D) EC curves for the generated shapes over.

eta

(float) : The kernel shape parameter.

truncated

(int) : The number of "cuts" to compute TPR/FPR for the ROC curve over. Used to speed up ROC computations.

two_curves

(boolean) : Whether or not to compute ROC curves using class specific causal points, or the set of all causal points. Setting two_curves = TRUE will provide two curves, for each class.

ball

(boolean) : Denotes whether or not to compute the EC curves over a ball for uniform measurements

ball_radius

(float) : The radius of the bounding ball used if we compute the balled EC curve.

type

(string) : The assessment scheme. We currently support 'vertex' (finding causal vertices), 'feature' (finding causal sub-level sets), 'cusp' (finding causal cusps for spheres).

min_points

(int) : Used when type = 'feature'. The mininum number of causal vertices for a sub-level set to be associated with to be considered a causal 'feature'.

directions_per_cone

(int): The number of directions we want generated within each cone.

cap_radius

(float): The radius of the cones we generate (determines the size of each cone).

radius

(int) : The number of sub-level sets "before" and "after" the selected sub-level sets we want to include (during reconstruction).

ec_type

(string) : The type of EC we are computing. We currently support ECT, DECT and SECT.

mode

(string) : The data generation scheme. We currently support 'sphere', 'gaussian_grid", or interpolations (default).

subdivision

(int) : The fineness of the sphere meshes (if mode == 'sphere'). We currently use subdivision = 3.

num_causal_region

(int) : The number of causal cusps (for when mode == 'sphere').

num_shared_region

(int) : The number of shared cusps (for when mode == 'sphere').

Value

roc_curve (matrix): The ROC curve for both classes of shapes


lcrawlab/SINATRA documentation built on Sept. 13, 2023, 2 p.m.