Closed oritush closed 2 years ago
It is by design and the javadoc states so clearly.
the javadoc says that Returns the linear coefficients without intercept.
but besides the intercept, the last coefficient is also missing, as seen in the example I sent.
Fixed. thanks!
Describe the bug
smile.regression.LinearModel#coefficients
method in Scala api, returns n-1 coefficients instead of n.Expected behavior In the t-test matrix, the first columns return the complete array of coefficients (+ the intercept)
Actual behavior The issue is in this code
because the
to
argument inArrays.copyOfRange
method is exclusiveCode snippet based on your example code, I just added the prints at the end:
the output is: