suiji / Arborist

Scalable decision tree training and inference.
Other
82 stars 14 forks source link

Error while installing #49

Closed nsingh9 closed 4 years ago

nsingh9 commented 4 years ago

I tried couple of things while installing Rborist in R. But i'm getting following error message.

Error in .shlib_internal(args) : 
  C++14 standard requested but CXX14 is not defined

This is my session info:

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1 
suiji commented 4 years ago

This should be solvable by defining CXX14 and CXX14STD in your personal Makevars configuration. How you define these parameters, though, will depend on the compiler you want to use.

Have you tried using the pre-built binaries?

nsingh9 commented 4 years ago

Thank you. I later tried installing binary and it worked. Although I was tring to access makevars configuration to define CXX14, but couldn't fine any file.

suiji commented 4 years ago

You may need to create your own Makevars. The default behaviour for R is to look for this file in the ".R" subdirectory, which you may also need to create. In any case, if the binaries suit your needs then you may not want to do any of this.

Closing, but feel free to re-open as needed.

nsingh9 commented 4 years ago

I'm gettting this error -

Error in Rborist.default(x[, col_index], y, predProb = 0.9, minNode = 5,  : 
  Conflicting sampling specifications:  Bernoulli vs. fixed.

while using this code

t <- Rborist(x[, col_index], 
             y , 
             predProb = 0.9,
             minNode = 5, 
             nSamp = 50, 
             nTree = 5, 
             predFixed = b )
suiji commented 4 years ago

The error message indicates that two distinct methods of sampling variables have been requested, whereas only one may be specified at each invocation.

'predFixed', which is equivalent to other packages' 'mtry', specifies sampling a fixed number of predictors at each split. 'predProb', OTOH, specifies a fixed probability of sampling each predictor. Hence only one such option may be specified at a time.

nsingh9 commented 4 years ago

Using only preFixed is giving me following error

b = c(10, 30, 50)
 t <- Rborist(x[, col_index], 
              y , 
              minNode = 5, 
              nSamp = 50, 
              nTree = 5, 
              predFixed = b )
Error in Rborist.default(x[, col_index], y, minNode = 5, nSamp = 50, nTree = 5,  : 
  'predProb' must have a scalar value
In addition: Warning message:
In if (predFixed == 0) { :
  the condition has length > 1 and only the first element will be used

and using preProbe instead of preFixed is crashing R session.

Untitled

suiji commented 4 years ago

In future, please submit a new Issue if reporting on an unrelated topic. If reporting on the same topic, please reopen the Issue, otherwise the new entry may pass completely unnoticed.

"predFixed" should have a scalar value, for it specifies a fixed number of predictors to be sampled at each potential split. The error message, interestingly, contains a misleading message. Thank you for pointing this out.

I am unable to reproduce any problem with "predProb", per se. You may be running into an unrelated problem already reported by several users, however. Please try specifying "autoCompression = 1.0" as an option, to turn off autocompression. If so, this has already been repaired in 0.2-3, awaiting release to CRAN.