Sage-Bionetworks / challengescoring

This R package provides scoring mechanisms for computational challenges and implements the bayesBootLadderBoot approach for avoiding test data leakage.
Apache License 2.0
3 stars 0 forks source link

Add metric functions tests #20

Closed andrewelamb closed 1 year ago

andrewelamb commented 4 years ago

@thomasyu888 @allaway

This is not ready to merge, but please comment

thomasyu888 commented 4 years ago

Can also merge develop back in because this branch has all the validation functions

thomasyu888 commented 4 years ago

I merged my CI in, so the tests will auto run now for you when pushing to the branch. If you're curious to learn about github actions, here is the action that is set to run on PR into develop https://github.com/Sage-Bionetworks/challengescoring/blob/develop/.github/workflows/r_cmd_check.yml

andrewelamb commented 4 years ago

package e1071 is required Backtrace:

  1. testthat::expect_equal(...)
  2. challengescoring::score_mcc(...)

    [error]Error: R CMD check found ERRORs

    Execution halted

  3. caret:::confusionMatrix.default(data = pred, reference = gold)
  4. getFromNamespace("confusionMatrix.table", "caret")(...)
  5. caret:::requireNamespaceQuietStop("e1071")

══ testthat results ═══════════════════════════════════════════════════════════ [ OK: 40 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]

  1. Error: score_mcc (@test-scoring_functions.R#35)
andrewelamb commented 4 years ago

e1071 is a dependency of caret, I wonder why it's not being installed in the test env.

andrewelamb commented 4 years ago

I added e1701 to the description file and that seems to have fixed the error. I also removed the duplicate auc function.

thomasyu888 commented 4 years ago

The test command itself runs really quickly, and I've set it to ignore most things except when it errors out on the tests.

It may be annoying but it seems like it was useful