Unit Testing for Pearson Correlation Coefficient
ClosedPublic

Authored by devanshuagarwal on Jul 22 2019, 11:37 AM.

Details

Reviewers
sgerlach
Summary

Unit testing for the Pearson Correlation Coefficient Testing.

Diff Detail

Repository
R262 LabPlot
Lint
Lint Skipped
Unit
Unit Tests Skipped
Restricted Application added a project: KDE Edu. · View Herald TranscriptJul 22 2019, 11:37 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
devanshuagarwal requested review of this revision.Jul 22 2019, 11:37 AM
sgerlach added inline comments.Jul 22 2019, 11:45 AM
tests/stats/correlation_coefficient/CorrelationCoefficientTest.cpp
36

indentation looks strange again. Ignore if it's ok in your code.

101

you can omit the ';' after QDEBUG

106

10% error is a lot. Can you decrease it?

devanshuagarwal marked an inline comment as done.Jul 22 2019, 4:17 PM
devanshuagarwal added inline comments.
tests/stats/correlation_coefficient/CorrelationCoefficientTest.cpp
36

It is ok in code

106

Yes, I have decreased it to 1%. Is it ok?

sgerlach added inline comments.Jul 22 2019, 4:22 PM
tests/stats/correlation_coefficient/CorrelationCoefficientTest.cpp
106

The relative error should be as small as possible. Normally you should only have numerical errors. In your case the expected value has a limited number of digits which leads to a deviation from the calculated value. Try to reduce the error as much as possible.

This revision is now accepted and ready to land.Jul 23 2019, 11:47 AM
sgerlach closed this revision.Jul 23 2019, 11:47 AM