gaussSeidel {optR} | R Documentation |
Gauss-Seidel based Optimization & estimation
Description
Function utilizes the Gauss-Seidel optimization to solve equation Ax=b
Usage
gaussSeidel(A, b, x = NULL, iter = 500, tol = 1e-07, w = 1,
witr = NULL)
Arguments
A |
: Input matrix |
b |
: Response |
x |
: Initial solutions |
iter |
: Number of Iterations |
tol |
: Convergence tolerance |
w |
: Relaxation paramter used to compute weighted avg. of previous solution. w=1 represent no relaxation |
witr |
: Iteration after which relaxation parameter become active |
Value
optimal : Optimal solutions
initial : initial solution
relaxationFactor : relaxation factor
Examples
A<-matrix(c(4,-1,1, -1,4,-2,1,-2,4), nrow=3,ncol=3, byrow = TRUE)
b<-matrix(c(12,-1, 5), nrow=3,ncol=1,byrow=TRUE)
Z<-optR(A, b, method="gaussseidel", iter=500, tol=1e-7)
[Package optR version 1.2.5 Index]