oscar {oscar}R Documentation

Main OSCAR fitting function

Description

This function fits an OSCAR model object to the provided training data with the desired model family.

Usage

oscar(
  x,
  y,
  k,
  w,
  family = "cox",
  metric,
  solver = 1,
  verb = 1,
  print = 3,
  kmax,
  sanitize = TRUE,
  percentage = 1,
  in_selection = 1,
  storeX = TRUE,
  storeY = TRUE,
  control,
  ...
)

Arguments

x

Data matrix 'x'

y

Response vector/two-column matrix 'y' (see: family); number of rows equal to nrow(x)

k

Integer (0/1) kit indicator matrix; number of columns equal to ncol(x), Default: Unit diagonal indicator matrix

w

Kit cost weight vector w of length nrow(k), Default: Equal cost for all variables

family

Model family, should be one of: 'cox', 'mse'/'gaussian', or 'logistic, Default: 'cox'

metric

Goodness metric, Default(s): Concordance index for Cox, MSE for Gaussian, and AUC for logistic regression

solver

Solver used in the optimization, should be 1/'DBDC' or 2/'LMBM', Default: 1.

verb

Level of verbosity in R, Default: 1

print

Level of verbosity in Fortran (may not be visible on all terminals); should be an integer between range, range, Default: 3

kmax

Maximum k step tested, by default all k are tested from k to maximum dimensionality, Default: ncol(x)

sanitize

Whether input column names should be cleaned of potentially problematic symbols, Default: TRUE

percentage

Percentage of possible starting points used within range [0,1], Default: 1

in_selection

Which starting point selection strategy is used (1, 2 or 3), Default: 1

storeX

If data matrix X should be saved in the model object; turning this off might would help with memory, Default: TRUE

storeY

If data response Y should be saved in the model object; turning this off might would help with memory, Default: TRUE

control

Tuning parameters for the optimizers, see function oscar.control(), Default: see ?oscar.control

...

Additional parameters

Details

OSCAR utilizes the L0-pseudonorm, also known as the best subset selection, and makes use of a DC-formulation of the discrete feature selection task into a continuous one. Then an appropriate optimization algorithm is utilized to find optima at different cardinalities (k). The S4 model objects 'oscar' can then be passed on to various down-stream functions, such as oscar.pareto, oscar.cv, and oscar.bs, along with their supporting visualization functions.

Value

Fitted oscar-object

See Also

oscar.cv oscar.bs oscar.pareto oscar.visu oscar.cv.visu oscar.bs.visu oscar.pareto.visu oscar.binplot

Examples

if(interactive()){
  data(ex)
  fit <- oscar(x=ex_X, y=ex_Y, k=ex_K, w=ex_c, family='cox')
  fit
}

[Package oscar version 1.2.1 Index]