model_gen | R Documentation |
This function takes in all the data needed to produce machine learning model. Inputs are handed to a RMD report/ script. Outputs include the markdown report, the cross validation object, and a binary model (RDS) that can then be used to predict on new data.
model_gen( traindat, target, mType = "rF", outDir = ".", trees = 500, rseed = NA )
traindat |
Is a dataframe that contains the model training data. The reponse variable should be one of the columns. |
target |
The name of the response variable in the traindat data frame. |
mType |
rF for a |
outDir |
Highly recommended to be set as an absolute directory. This defaults to the project's root directory OR where the RMD script is saved. Additional products generated from the associated 'model_gen_XXX.Rmd“ markdown scripts will also be saved to this dir. |
trees |
A random forest parameter for the number of trees to use. |
rseed |
Optional random number seed. |
dat <- read.csv("e:/workspace/2020/PEM/ALRF_PEMv2/dev/modDat.csv", stringsAsFactors = TRUE) model_gen(traindat = dat, target = "SiteSeries", outDir = "e:/tmp/model_gen_test", mType = "rF", trees = 500, rseed = 456)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.