A wrapper to create a lm model just specifying columns, generating a model formula for you __without an intercept__. This makes it easier to run automated comparisons with other models in heuristica.
regModel(train_matrix, criterion_col, cols_to_fit, fit_name = "regModel")
A matrix (or data.frame) of data to train (fit) the model with.
The index of the criterion column-- "y" in the formula.
A vector of column indexes to fit-- the "x's" in the formula.
Optional The name other functions can use to label output. It defaults to the class name.
An object of class regModel, which is a subclass of lm.
This version assumes you do NOT want to include the intercept. Excluding the intercept typically has higher out-of-sample accuracy if the goal is predicting rank order because the intercept does not affect the ranking, but estimating it wastes a degree of freedom.
lm
for the regression function being wrapped.
predictPair
for predicting whether row1 is greater.
greater.