predict.multilayer: predict outcomes of observations in data using *selected...

View source: R/classifier_model_summary.R

predict.multilayerR Documentation

predict outcomes of observations in data using *selected features*

Description

predict outcomes of observations in data using *selected features*

Usage

## S3 method for class 'multilayer'
predict(models, dd)

Arguments

dd

input matrix, of dimension nobs x nvars; each row is an observation vector. Since this is an input to glmnet, it should be the format that can be used with glmnet

model

a list of models which is an outcome of cv_loop_train_iter or cv_train_final, a model trained for a class see example below.

type

'raw' (default) or 'prob'

Value

a named vector, either outputs class labels ('raw) or probability tables, a column for each class label ('prob')

mm = list( main = a_main_model, c1 = a_c1_model, c2 = a_c2_model )

main is applied first which should classify samples into either c1 or c2 all samples classified to c1 will be then fed into a_c1_model, and the samples classified to c2 will be fed into a_c2_model.

a model can be NULL, meaning no more action.

The list can be nested. For example,

mm = list( main = a_main_model, c1 = a_c1_model, c2 = list ( main = a_c2_model, c2a = a_c2a_model, c2b = a_c2b_model ) )


skimlab/CCSBUtils documentation built on March 30, 2022, 4:52 a.m.