Added renderer test for k-Fold Cross Validation Visualization#310
Added renderer test for k-Fold Cross Validation Visualization#310ANAMASGARD wants to merge 15 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #310 +/- ##
=======================================
Coverage 73.09% 73.09%
=======================================
Files 164 164
Lines 8769 8769
=======================================
Hits 6410 6410
Misses 2359 2359
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Sir @tdhock but wanted to ask one thing in my fedora 43 in R Studio when ever I was running test locally it forced me to un-googled chromium , I deleted the un-googled chromium but still caused issue , so made .Renviron file with forcing it to use the chrome then it finally worked CHROMOTE_CHROME="/usr/bin/google-chrome-stable" |
|
Sir @tdhock , |
| html <- getHTML() | ||
| rects <- getNodeSet(html, | ||
| '//g[contains(@class,"rect") and contains(@class,"cvplot")]//rect') | ||
| expect_gt(length(rects), 0) |
There was a problem hiding this comment.
just checking if I’m understanding this correctly , since the rectangles in the CV plot are already present before the click, and this test only checks whether rectangles are present, would this test still pass even if clickID() didn’t actually change anything in the plot (i.e. didn’t update the highlighted fold)?
if so, it might be better to test something that directly shows the effect of clicking fold 3 (for example, checking the opacity of the highlighted fold before and after the click).
this might also be easier to see if you update the demo video by running the test code line by line and showing the browser before and after clickID().
There was a problem hiding this comment.
New Video Link = https://youtu.be/v5xcP2a0j_8?si=pAXgeB6zJWJBuBih
(both folds have 15 tomato + 135 steelblue). Now we directly check the green highlight rectangle's x position, which changes when the selected fold changes. This addresses reviewer feedback asking for a test that would fail if clickID() had no effect.
|
the test and video look much better now,it’s good to see that the test actually verifies a change in the plot after clickID(). the line-by-line execution in the video also makes the behaviour much clearer. |
| expect_color(fill_by_count[1], "tomato") # Fewer dots = Test points | ||
| expect_color(fill_by_count[2], "steelblue") # Many dots = Train points |
There was a problem hiding this comment.
please avoid numbered indices like [1] and [2] here. can you please instead test the entire vector?
| for(col.name in names(fill_counts)){ | ||
| expect_color(col.name, if(fill_counts[col.name] == min(fill_counts)) "tomato" |
…renderer2-param-off.R
This is the hard test solution for GSoC 2026.
I have added test-renderer-cv-ani for the k-Fold Cross Validation animation.
Video demonstration [ Updated ] :- https://youtu.be/v5xcP2a0j_8
Visualization that I used :- https://anamasgard.github.io/cv-ani-animint/
Sir @tdhock , Ma'am @suhaani-agarwal please review this test and give your feedback.
Thank You