features: Selected Features for Binary Classification

Description Usage Arguments Value Examples

Description

Generic function to determine what features were selected by the model to determine binary classification.

Usage

1

Arguments

x

An R object. Currently there are methods for basic_cv, nested_cv, bc_simulate and bc_estimate.

...

Further arguments passed to or from other methods.

Value

A character string with the column labels for the features the model selected as major determinants in binary classification.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Simulate data
sim = bc_simulate( 300, 8, 4 )
# Determine which predictors were selected to be non-zero
features( sim )
# Set data up for estimation
dat = train_test( 2, c( rep(1,200), rep(2,100) ), sim$y, sim$X )
# Fit data
fit = bc_estimate( 'glm', dat )
# Features selected by model
features( fit )
# K-fold cross-validation
kf_cv = basic_cv( sim$y, sim$X, 'glm', K = 3 )
# Features selected by model
features( kf_cv )
# Nested K-fold cross-validation
nkf_cv = nested_cv( sim$y, sim$X, 'glm', K = c(3,10) )
features( kf_cv )

rettopnivek/binclass documentation built on May 13, 2019, 4:46 p.m.