[R] Fix CRAN error for Mac OS X (#4672)

* fix cran error for mac os x

* ignore float on windows check for now
This commit is contained in:
Tong He
2019-07-17 17:55:52 -07:00
committed by Philip Cho
parent cafc8bff58
commit b77a89ec28
5 changed files with 8 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ First let's dump the model to JSON:
```{r}
bst_json <- xgb.dump(bst, with_stats = FALSE, dump_format='json')
bst_from_json <- jsonlite::fromJSON(bst_json, simplifyDataFrame = FALSE)
bst_from_json <- fromJSON(bst_json, simplifyDataFrame = FALSE)
node <- bst_from_json[[1]]
cat(bst_json)
```
@@ -186,4 +186,4 @@ bst_from_json_preds <- ifelse(fl(data$dates)<fl(node$split_condition),
bst_preds == bst_from_json_preds
```
All equal. What's the lesson? We have to ensure that all calculations are done with 32-bit floating point operators if we want to reproduce the results that we see with xgboost.
All equal. What's the lesson? We have to ensure that all calculations are done with 32-bit floating point operators if we want to reproduce the results that we see with xgboost.