Skip to content

Issue 52: RMSE & MAE - #123

Open
sheetalsattiraju wants to merge 4 commits into
Oremif:masterfrom
sheetalsattiraju:52-sheetal-sattiraju-ai301
Open

Issue 52: RMSE & MAE#123
sheetalsattiraju wants to merge 4 commits into
Oremif:masterfrom
sheetalsattiraju:52-sheetal-sattiraju-ai301

Conversation

@sheetalsattiraju

Copy link
Copy Markdown

What does this PR do?

  • This PR adds rmse() (Root Mean Square Error) and mae() (Mean Absolute Error) as metrics in kstats-core/src/commonMain/kotlin/org/oremif/kstats/descriptive/RegressionMetrics.kt.
  • Each metric is implemented with three overloads (DoubleArray, Iterable, Sequence) and uses the project's summation helper (compensatedSum()).
  • A corresponding test file is included in kstats-core/src/commonTest/kotlin/org/oremif/kstats/descriptive/RegressionMetricsTest.kt, mirroring the structure of CentralMomentTest.kt.

Why was this PR needed?

  • In issue Implement RMSE and MAE error metrics #52, the maintainer asked for these metrics to be added to kstats-core.
  • RMSE and MAE are standard tools for evaluating prediction quality in regression, recommendation systems, and forecasting

What are the relevant issue numbers?

Does this PR meet the acceptance criteria?

  • Tests added for new/changed behavior in kstats-core/src/commonTest/kotlin/org/oremif/kstats/descriptive/RegressionMetricsTest.kt covering known values, edge cases, invalid input, NaN propagation, and overload consistency (24 test cases total)
  • All tests passing
  • Follows project style guide — implementation mirrors the structure in existing CentralTendency.kt file
  • No breaking changes introduced — 2 files added, no existing metrics or APIs were modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant