inputMatrix := #( #(1 2) #(2 3) ).
outputVector := #( 3 5 ).
model := AILinearRegressionLeastSquaresVanilla new.
model fitX: (PMMatrix rows: inputMatrix ) y: outputVector.
model predict: #( #(3 1) #( 2 5) )
Here the result should be (4 7), the output is simply x1 + x2, but it gives (-8.074767078498812 9.366563145999471), while the Lapack version gives the correct answer:
inputMatrix := #( #(1 2) #(2 3) ).
outputVector := #( 3 5 ).
model := AILinearRegressionLeastSquares new.
model fitX: (AIColumnMajorMatrix rows: inputMatrix ) y: outputVector.
model predict: #( #(3 1) #( 2 5) )
I tested several formats for the input (2 variables and 2 rows, 3 variables and 2 rows, 3 variables and 3 rows, 4 variables and 3 rows), and it seems that the issue disappears with 4 variables or more.
Here the result should be
(4 7), the output is simply x1 + x2, but it gives(-8.074767078498812 9.366563145999471), while the Lapack version gives the correct answer:I tested several formats for the input (2 variables and 2 rows, 3 variables and 2 rows, 3 variables and 3 rows, 4 variables and 3 rows), and it seems that the issue disappears with 4 variables or more.