vwok: vwok

View source: R/adaptive.R

vwokR Documentation

vwok

Description

Variable-Wise Optimized k method for optimizing NPDR scores for each attribute as a function of k Computes p x k beta and P value matrices for a data set with p attributes

Usage

vwok(
  dats = NULL,
  k.grid = NULL,
  verbose = F,
  attr.diff.type = "numeric-abs",
  corr.attr.names = NULL,
  signal.names = NULL,
  separate.hitmiss.nbds = FALSE,
  label = "class"
)

Arguments

dats

m x (p+1) data set of m instances and p attributes with 1 binary outcome or m x [p(p - 1) + 1] with p(p-1) correlations and 1 outcome. Outcome is last column for standard m x (p + 1) and first column for m x [p(p - 1) + 1] (no good reason for the difference).

k.grid

increasing sequence of k values used as looping index. Default is seq(1,(nrow(dats)-1),by=1).

verbose

logical indicating whether to print progress with loop. Default is FALSE, but TRUE also does not give anything useful.

attr.diff.type

character indicating the type of attribute diff to use. Default is 'numeric-abs' for standard continuous data. Use 'correlation-data' for rs-fMRI data.

corr.attr.names

character indicating names of ROIs for attr.diff.type='correlation-data'. Default is NULL.

signal.names

variable names with simulated signals

separate.hitmiss.nbds

logical indicating whether to compute hit/miss neighborhoods separately. Default is FALSE.

label

character indicating type of response. Default is "class" and should not change as of yet.

Value

A list with:

vwok.out

p x 4 data.frame of sorted beta coefficients, atts, vwok ks, and p-values from NPDR

best.auPRC.k

1 x 2 data.frame of auPRC-optimal fixed k (if signal.names provided) and corresponding auPRC

Examples

dats <- do.call(rbind, case.control.3sets[c("train", "holdout")])

# run Variable-Wise Optimized k function
## Not run: 
out <- vwok(
  dats = dats,
  k.grid = NULL,
  verbose = T,
  attr.diff.type = "numeric-abs",
  label = "class"
)

## End(Not run)


insilico/glmSTIR documentation built on July 7, 2023, 12:29 a.m.