Skip to content
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

-long-double issues #116

Closed
topepo opened this issue Jan 5, 2018 · 1 comment

Comments

@topepo
Copy link
Collaborator

commented Jan 5, 2018

On 12/19/17:

This concerns packages

CBPS ExtDist GGIR RInSp RSQLite drtmle expss gamlss.inf lakemorpho lhs partitionComparison pre recipes tableone vpc xgboost xpose

which have 'noLD' 'Additional issues' reported on their CRAN results pages. And to quote the manual

Only test the accuracy of results if you have done a formal error analysis. Things such as checking that probabilities numerically sum to one are silly: numerical tests should always have a tolerance. That the tests on your platform achieve a particular tolerance says little about other platforms. R is configured by default to make use of long doubles where available, but they may not be available or be too slow for routine use. Most R platforms use ‘ix86’ or ‘x86_64’ CPUs: these use extended precision registers on some but not all of their FPU instructions. Thus the achieved precision can depend on the compiler version and optimization flags—our experience is that 32-bit builds tend to be less precise than 64-bit ones. But not all platforms use those CPUs, and not all which use them configure them to allow the use of extended precision. In particular, ARM CPUs do not (currently) have extended precision nor long doubles, and long double was 64-bit on HP/PA Linux.

If you must try to establish a tolerance empirically, configure and build R with --disable-long-double and use appropriate compiler flags (such as -ffloat-store and -fexcess-precision=standard for gcc, depending on the CPU type) to mitigate the effects of extended-precision calculations.

Packages partitionComparison and vpc do test for sums without a tolerance ....

Please submit a corrected update before Jan 24 to safely retain the package on CRAN.

--
Brian D. Ripley, ripley@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

The errors are shown here but are:

Running the tests intests/testthat.Rfailed.
Complete output:
  > library(testthat)
  > library(recipes)
  Loading required package: dplyr
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Loading required package: broom
  
  Attaching package: 'recipes'
  
  The following object is masked from 'package:stats':
  
      step
  
  > 
  > test_check(package = "recipes")
  ── 1. Failure: correct means and std devs (@test_center_scale.R#34)  ───────────
  tidy(standardized_trained, 2) not equal to `scal_tibble_tr`.
  Rows in x but not y: 2. Rows in y but not x: 2. 
  
  ── 2. Failure: defaults (@test_classdist.R#36)  ────────────────────────────────
  `tidy_exp_tr` not equal to tidy(trained, number = 1).
  Rows in x but not y: 10, 9, 8, 6, 4, 3, 2, 1. Rows in y but not x: 10, 9, 8, 6, 4, 3, 2, 1. 
  
  ── 3. Failure: correct PCA values (@test_pca.R#49)  ────────────────────────────
  `tidy_exp_tr` not equal to tidy(pca_extract_trained, number = 3).
  Rows in x but not y: 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15[...]. Rows in y but not x: 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15[...]. 
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 690 SKIPPED: 2 FAILED: 3
  1. Failure: correct means and std devs (@test_center_scale.R#34) 
  2. Failure: defaults (@test_classdist.R#36) 
  3. Failure: correct PCA values (@test_pca.R#49) 
  
  Error: testthat unit tests failed
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ininst/doc... OK
* checking re-building of vignette outputs ... [22s/42s] OK
* checking PDF version of manual ... OK
* DONE

topepo pushed a commit that referenced this issue Jan 10, 2018

Max Kuhn
@topepo

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 11, 2018

on CRAN now

@topepo topepo closed this Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.