lmWrapper: Create an lm model just specifying columns, generating a...

View source: R/heuristics.R

lmWrapperR Documentation

Create an lm model just specifying columns, generating a formula for you.

Description

Create an lm model just specifying columns, generating a formula for you.

Usage

lmWrapper(train_matrix, criterion_col, cols_to_fit, include_intercept = TRUE)

Arguments

train_matrix

A matrix (or data.frame) of data to train (fit) the model with.

criterion_col

The index of the criterion column– "y" in the formula.

cols_to_fit

A vector of column indexes to fit– the "x's" in the formula.

include_intercept

A boolean of whether to include an intercept in the formula.

Value

An object of class lm.


jeanimal/heuristica documentation built on Feb. 3, 2024, 9:56 p.m.