-
-
Notifications
You must be signed in to change notification settings - Fork 365
i.smap: add test file #5413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i.smap: add test file #5413
Conversation
The test sometimes fails on my PR (#5527). Anyone else noticed anything strange with this new i.smap test? For example in https://github.com/OSGeo/grass/actions/runs/14423101622/job/40448155461?pr=5527:
|
Yes, I remember having to do some reruns on some PRs with a test from imagery being flaky |
Thanks for flagging this! I dug into it and traced the flakiness to an ambiguity in the arithmetic expression used for generating the third synthetic raster input ( In the following line: 20 * exp(-((row() - 50)^2 + (col() - 50)^2) / 500) the division by 500 is evaluated after the exponential due to operator precedence, which leads to significantly smaller values than intended. This affects the input fed to Adding parentheses to correctly group the division inside the exponent resolves the issue and makes the test deterministic: 20 * exp(-(((row() - 50)^2 + (col() - 50)^2) / 500)) I will push this fix shortly. |
Raised the PR to resolve this behavior - #5552 |
This PR introduces a comprehensive test suite for the
i.smap
GRASS GIS module, validating its functionality. The suite ensures the robustness of classification algorithms.Key Updates in this PR
-m
flag.Test Case Descriptions
i.smap
produces the expected number of distinct classes.-m
flag and evaluates the classification accuracy usingr.kappa
.Performance
This test suite significantly enhances the reliability of the
i.smap
module by covering both core functionalities and edge cases. Looking forward to feedback and potential refinements!