makeModels: ABA models and accuracy assessment

Description Usage Arguments Details Value

View source: R/makeModels.R

Description

Based on plot-level forest attributes and correpsonding ALS metrics, this function train predictive models based on a modeling approach (currently only random forest is implemented) and assess models accuracy using k-folds cross-validation

Usage

1
makeModels(dat, attNames, preds, k = 5, titles, saveModel, saveFigure, outdir)

Arguments

dat

data.frame. Need to contain both forest attributes and ALS metrics

attNames

Character. Name of attrbiutes to be modeled

preds

Character. Name of ALS metrics to be included

k

Numeric. Number of folds to be created for k-folds cross-validation. Default is 5

titles

List containing titles of scatterplots. Elements must be named according to attNames. If missing, scatterplots won't have any title

saveModel

Logical. If TRUE, models will be saved in outdir in .rds format. Default if FALSE

saveFigure

Logical. If TRUE, save scatterplots in outdir. Currently save a pdf file of 4 inches width and 4 inches height

outdir

Character. Path to exisiting directory where models and scatterplots will be saved if wanted

Details

Further details

Value

A list with one element per modeled forest attribute and one element containing accuracy measures (R2, RMSE and bias).


mqueinnec/RMFinventory documentation built on May 4, 2021, 10:45 a.m.