i had the row index 1st initially and got an error message that said:

org.apache.commons.math3.exception.DimensionMismatchException: 17 != 293

so i tried reversing the row/columns, no luck got the message below.



On 12/31/2017 4:56 PM, Gilles wrote:
On Sun, 31 Dec 2017 15:01:23 -0600, Andy Arledge wrote:
Hi,

I get an

"org.apache.commons.math3.exception.MathIllegalArgumentException: not
enough data (17 rows) for this many predictors (293 predictors)"

with the following code : https://pastebin.com/aZ4DXQB3

My class extends OLSMultipleLinearRegression. I have 293 rows of data
with 17 columns.

Is there something I'm missing here? I'm basing my work on the example @


http://commons.apache.org/proper/commons-math/userguide/stat.html#a1.5_Multiple_linear_regression

Thanks for any guidance.

In Java, the "row" index is the first dimension.
Try
---CUT---
 double[][] data = new double[myList.size()][17];
 // etc.
---CUT---

HTH,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org


--
Thanks
Andy

Andy Arledge
Appraiser Genie, LLC
325-455-7890
www.appraisergenie.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to