Hello, Issue was noticed as a PMD violation during PR’s Travis CI build. “The class 'OLSResults' is suspected to be a Data Class (WOC=20.000%, NOPA=0, NOAM=4, WMC=6)” https://github.com/apache/commons-statistics/pull/23
UML for current design: https://github.com/BBenNguyenn/commons-statistics/blob/gsoc-milestone-1/commons-statistics-regression/UML_current.png The current design is my (probably wrong) interpretation on a suggestion from Eric Barnhill. The idea is that all calculation functionality is done in the OLSRegression class, which passes itself to the OLSResults constructor via regress() method. The OLSResults (implementing RegressionResults interface) calls on statistics calculating methods from OLSRegression and saves it as private fields with getters. I am thinking this is good for users who want everything to be calculated only once to then be used multiple times (without the recalculation or having to save all statistics themselves). The RegressionResults interface could also include some kind of output method to get all statistics in a file or displayed? Then, for those who only want a single calculated statistic, the methods to calculate in OLSRegression are also public. This design does cause that PMD error, so any suggestions or alternate designs to correct my interpretation? Thank you, Cheers, -Ben Nguyen