model_lin: Linear regression

Description Usage Arguments Details Value

View source: R/def.R

Description

Defines a linear regression task

Usage

1
model_lin(y, a = NULL, nonneg = FALSE, fix_bias = FALSE)

Arguments

y

n-by-1 numeric vector of response values

a

n-by-1 vector of sample weights

nonneg

set to TRUE to enforce non-negativity constraints on the weights (default: FALSE)

fix_bias

set to TRUE to prevent the bias term from being updated (default: FALSE)

Details

The objective function is given by

\frac{1}{2n} ∑_i a_i (y_i - (w^T x_i + b))^2 + R(w)

Value

A GELnet task definition that can be combined with gelnet() output


ArtemSokolov/gelnet documentation built on Sept. 13, 2019, 4:01 a.m.