[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user