Description Usage Arguments Examples
Funtion to cross-validate categorical prediction accuracy from resultant chl a. A Random forest of forests... Used to get categorical accuracy. Also returns a cross-validated accuracy of
1 | crossval_rf(y, x, breaks, cat = NULL, split, n, ntree)
|
y |
response a vector |
x |
predictors a data.frame |
breaks |
numeric vector of cut points |
cat |
categories of response |
split |
proportion to include in training datset. test set to inverse. |
n |
number of iterations |
1 2 3 4 5 6 7 8 | data(LakeTrophicModelling)
predictors_all <- predictors_all[predictors_all!="DATE_COL"]
all_cf_dat <- data.frame(ltmData[predictors_all],LogCHLA=log10(ltmData$CHLA))
all_cf_dat <- all_cf_dat[complete.cases(all_cf_dat),]
ts_brks <- c(min(all_cf_dat$LogCHLA),log10(2),log10(7),log10(30),max(all_cf_dat$LogCHLA))
ts_cats <- c("oligo","meso","eu","hyper")
x<-crossval_rf(all_cf_dat$LogCHLA,all_cf_dat[,names(all_cf_dat)!="LogCHLA"],
ts_brks,ts_cats,0.8,1000,1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.