Here is a schematic for how the interface might be made more abstract. https://imgur.com/a/izx5Xkh
In this case, we may want to just implement the simplest case, using Matrix and double[], for now. In principle the RegressionMetric class could extend a Metrics class later. Do you feel this would set up the library better for the future? Eric