How can I compute the Spearman correlation of two m×n arrays in Java? Right now I'm using Apache Commons Math, and all the examples I can find are for calculating the Spearman correlation of two 1×n arrays.
I know how to do it using Excel, but I need to do it in Java.
Unless the rows and columns have a special meaning which needs to be preserved, it seems like the easiest way around the problem would be to flatten both arrays into 1x(mn) arrays (making sure to use the same flattening order for both arrays) and then refer to the examples on 1x(-) arrays.