VariableComboTest: Easily test models with various variable combination

Description Usage Arguments Value Examples

Description

Test how different model predictor combinations affect model performance. Function requires separate training and test data. Currently only parallel processing using doParallel is supported, will add a non parallel version soon

Usage

1
2
VariableComboTest(trainY, trainX, testY, testX, varCol, ModelNames, reps,
  NoCores)

Arguments

trainY

Vector of dependent variable, used for model training

trainX

dataframe/matrix of predictor variables, used for model training

testY

A vector of dependent variable to be used for model validation (testing)

testX

A data frame of predictor variables used for testing

varCol

a list of the column numbers for each model combination,

ModelNames

a vector containing the names used for each model combination, should corespond to variables list

reps

number of times to run each model

NoCores

Number of Cores to used to parallel processing

Value

A dataframe of model performance statistics for each sample variable combination. Metrics returned include coefficient of determination (Rsq), root mean squared error (RMSE), mean error (ME), mean absolute error (MAE).

Examples

1
2
#varCol  <- list(c(4:9),c(4:11),c(10:11),c(12:17),c(12:19),c(18:19),c(4:9,12:17), c(4:19),c(18,19,10,11),c(20,21),c(20,21,12:17),c(20,21,4:9),c(20,21,4:9,12:17),c(4:21))
#ModelNames  <- c("Wet SR","Wet SR+VI","Wet VI","Dry SR", "Dry SR+VI","Dry VI","Dry & Wet SR","Dry & Wet SR+VI","Dry & Wet VI","PALSAR","PALSAR & Dry SR","PALSAR & Wet SR","PALSAR & Wet+Dry SR","All" )

Tomhigg/fracCover documentation built on May 9, 2019, 5:11 p.m.