get_eta {glmnet}R Documentation

Helper function to get etas (linear predictions)

Description

Given x, coefficients and intercept, return linear predictions. Wrapper that works with both regular and sparse x. Only works for single set of coefficients and intercept.

Usage

get_eta(x, beta, a0)

Arguments

x

Input matrix, of dimension nobs x nvars; each row is an observation vector. If it is a sparse matrix, it is assumed to be unstandardized. It should have attributes xm and xs, where xm(j) and xs(j) are the centering and scaling factors for variable j respsectively. If it is not a sparse matrix, it is assumed to be standardized.

beta

Feature coefficients.

a0

Intercept.


[Package glmnet version 4.1-8 Index]