[ https://issues.apache.org/jira/browse/MAHOUT-1962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995538#comment-15995538 ]
ASF GitHub Bot commented on MAHOUT-1962: ---------------------------------------- Github user rawkintrevo commented on a diff in the pull request: https://github.com/apache/mahout/pull/300#discussion_r114639185 --- Diff: math-scala/src/main/scala/org/apache/mahout/math/algorithms/regression/tests/FittnessTests.scala --- @@ -47,10 +52,44 @@ object FittnessTests { // https://en.wikipedia.org/wiki/Mean_squared_error def MeanSquareError[R[K] <: RegressorModel[K], K](model: R[K], residuals: DrmLike[K]): R[K] = { + // TODO : I think mse denom should be (row - col) ?? val mse = residuals.assign(SQUARE).sum / residuals.nrow model.mse = mse model.testResults += ('mse -> mse) model.summary += s"\nMean Squared Error: ${mse}" model } + + // https://en.wikipedia.org/wiki/xxxx + def FTest[R[K] <: RegressorModel[K], K](model: R[K], drmFeatures: DrmLike[K], drmTarget: DrmLike[K]): R[K] = { + + // This is the residual sum of squares for just the intercept + //println(" drmTarget.ncol) = " + drmTarget.ncol) + val interceptCol = drmTarget.ncol - 1 --- End diff -- In addition- it seems that this is only used in some print statements that need to be deleted anyway. Probably can drop this line all together > Add F-test to Linear Regression Fitness Tests > ---------------------------------------------- > > Key: MAHOUT-1962 > URL: https://issues.apache.org/jira/browse/MAHOUT-1962 > Project: Mahout > Issue Type: Improvement > Components: Algorithms > Affects Versions: 0.12.0, 0.12.1, 0.13.0, 0.12.2 > Reporter: Dustin VanStee > Priority: Minor > Labels: beginner > Fix For: 0.13.1 > > Original Estimate: 96h > Remaining Estimate: 96h > > This update will modify > org.apache.mahout.math.algorithms.regression.tests.FittnessTests.scala and > add an overall Ftest for significance of one or more parameters being not > equal to zero. -- This message was sent by Atlassian JIRA (v6.3.15#6346)