Fitter functions for gpu enabled linear models
gpuLm.fit.RdThe C code called by this function was written by
Mark Seligman at Rapid Biologics, http://rapidbiologics.com
The function gpuLm calls this function
to fit linear models. So gpuLm.fit should not need to be used
directly.
Usage
gpuLm.fit(x, y, w = NULL, offset = NULL, method = "qr",
useSingle = getOption("gputools.precision", "single") == "single",
tol = gpuLm.defaultTol(useSingle), singular.ok = TRUE, ...)Arguments
- x
design matrix of dimension
n * p.- y
vector of observations of length
n, or a matrix withnrows.- w
vector of weights (length
n) to be used in the fitting process for thewfitfunctions. Weighted least squares is used with weightsw, i.e.,sum(w * e^2)is minimized.- offset
numeric of length
n). This can be used to specify an a priori known component to be included in the linear predictor during fitting.- method
currently, only
method="qr"is supported.- useSingle
logical:
TRUEcomputes in single precision on the GPU,FALSEin double. The default followsoptions(gputools.precision): single unless that is"double". It also sets the default tolerance (seegpuLm.defaultTol).
- tol
tolerance for the
qrdecomposition. Default is 1e-7.- singular.ok
logical. If
FALSE, a singular model is an error.- ...
currently disregarded.
Value
a list with components
- coefficients
pvector- residuals
nvector or matrix- fitted.values
nvector or matrix- effects
(not null fits)
nvector of orthogonal single-df effects. The firstrankof them correspond to non-aliased coefficients, and are named accordingly.- weights
nvector — only for the*wfit*functions.- rank
integer, giving the rank
- df.residual
degrees of freedom of residuals
- qr
(not null fits) the QR decomposition, see
qr.
See also
gpuLm which should usually be used for linear least squares
regression