gdls {cmna} R Documentation

Least squares with graident descent

Description

Solve least squares with graident descent

Usage

gdls(A, b, alpha = 0.05, tol = 1e-06, m = 1e+05)


Arguments

 A a square matrix representing the coefficients of a linear system b a vector representing the right-hand side of the linear system alpha the learning rate tol the expected error tolerance m the maximum number of iterations

Details

gdls solves a linear system using gradient descent.

Value

the modified matrix

Other linear: choleskymatrix(), detmatrix(), invmatrix(), iterativematrix, lumatrix(), refmatrix(), rowops, tridiagmatrix(), vecnorm()
head(b <- iris$Sepal.Length) head(A <- matrix(cbind(1, iris$Sepal.Width, iris$Petal.Length, iris$Petal.Width), ncol = 4))