sparsediscrim icon indicating copy to clipboard operation
sparsediscrim copied to clipboard

Fix failing HDRDA test for Windows i386

Open ramhiser opened this issue 7 years ago • 1 comments

I removed a failing test in 701a882eb5cedb97b829b1ec527670cf3370c489 so that the R package could be pushed to CRAN. I'd like to add the test back in but have it pass for Windows i386.

The failing test checked that HDRDA's calculations are correct for the special case of (lambda, gamma) = (0, 0) on the iris data set.

** running tests for arch 'i386' ... [12s] ERROR
  Running 'testthat.r' [10s]
Running the tests in 'tests/testthat.r' failed.
Last 13 lines of output:
  [3]  -0.00192 -  0.00192 == -0.00385
  [4]   0.00376 - -0.00376 ==  0.00753
  [5]  -0.07789 -  0.07789 == -0.15578
  [9]  -0.00192 -  0.00192 == -0.00385
  [13]  0.00376 - -0.00376 ==  0.00753
  
  
  testthat results ================================================================
  OK: 160 SKIPPED: 0 FAILED: 3
  1. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#60) 
  2. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#61) 
  3. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#62) 
  
  Error: testthat unit tests failed
  Execution halted
** running tests for arch 'x64' ... [11s] OK
  Running 'testthat.r' [11s]

In https://github.com/ramhiser/sparsediscrim/issues/38#issuecomment-322020385 @DarioS suggested the issue was:

It turns out that the sign of some of the off-diagonal numbers are the opposite to what is expected. It's likely that the eigenvectors used in the calculation of W_k have the opposite sign on a 32-bit computer.

ramhiser avatar Aug 14 '17 01:08 ramhiser