Learn R Programming

Laurae (version 0.0.0.9001)

report.lm: Linear Regression Modeling HTML report

Description

This function creates a linear regression report as a HTML file. Cross-validation is mandatory. Add quiet = TRUE to the list of arguments to make the function "shut up" the massive verbose text.

Usage

report.lm(data, label, folds, normalize = TRUE, cleaning = TRUE,
  deficiency = TRUE, stats = TRUE, coefficients = TRUE,
  adv_stats = TRUE, plots = TRUE, output_file = "report.lm.html",
  output_dir = getwd(), open_file = TRUE, quiet = FALSE, ...)

Arguments

data
Type: data.table. The data to fit a linear regression model on.
label
Type: vector. The label the data must fit to.
folds
Type: list of numeric vectors. The folds used.
normalize
Type: boolean. Whether features should be normalized before being fed to the linear model. Defaults to TRUE.
cleaning
Type: boolean. Whether NAs are set to 0 (if there are any). Defaults to TRUE.
deficiency
Type: boolean. Whether rank deficiency computation is done (kappa). Defaults to TRUE.
stats
Type: boolean. Whether machine learning statistics should be output for model performance diagnosis. When TRUE, also returns the metrics and the out of fold predictions. Defaults to TRUE.
coefficients
Type: boolean. Whether feature coefficients should be output. Defaults to TRUE.
adv_stats
Type: boolean. Whether advanced statistics should be done to analyze in depth the data. Defaults to TRUE.
plots
Type: boolean. Whether plotting of fitted values vs predicted values should be done. Defaults to TRUE.
output_file
Type: character. The output report file name. Defaults to "report.lm.html".
output_dir
Type: character. The output report directory name. Defaults to getwd().
open_file
Type: boolean. Whether to open the output report once it has finished computing. Defaults to TRUE.
quiet
Type: boolean. Whether to "shut up" while rendering the HTML file or not. Defaults to FALSE.
...
Other arguments to pass to rmarkdown::render.

Value

Returns a list with the machine learning models (Models), the machine learning metrics ("Metrics"), the folds "Folds", the fitted values per fold ("Fitted"), the predicted values per fold ("Predicted") if they were computed. Otherwise, returns TRUE.

Examples

Run this code
# No example.
## Not run: ------------------------------------
#   library(Laurae)
#   library(data.table)
#   library(rmarkdown)
#   library(RcppArmadillo)
#   library(DT)
#   library(formattable)
#   library(matrixStats)
#   library(lattice)
#   library(R.utils)
## ---------------------------------------------

Run the code above in your browser using DataLab