Solves a system of linear equations
OperationsCode example:
m1 := [
[1., 1., 2., 3.]
[1., 4., 5., 6.]
[1., 7., 8., 9.]];
m2 := [
[6.]
[16.]
[23.]];
solver := System.ML.LinearSolver->New(m1, m2)->Calculate(1);
solver->GetRSquared()->PrintLine();
Constructor
New(m1:Float[,], m2:Float[,])
Name | Type | Description |
---|---|---|
m1 | Float[,] | first matrix |
m2 | Float[,] | second matrix |
Calculates the equation coefficients
method : public : Calculate(offset:Int) ~ LinearResult
Name | Type | Description |
---|---|---|
offset | Int | offset column for r-squared |
Type | Description |
---|---|
LinearResult | equation coefficients and r-squared |