gboris / blkbox

Data exploration with multiple machine learning algorithms
14 stars 4 forks source link

Error: 'predict' is not an exported object from 'namespace:xgboost' #53

Closed drejom closed 7 years ago

drejom commented 7 years ago

Hi,

This looks like an awesome package, but I'm having trouble getting it going. Are you able to provide any assistance? Google found a few threads about mlr and xgboost, which seems the likely culprit, but I'm not sure how to solve the issue.

Cheers Den

> library(blkbox)
Java memory set to 4 gigabytes, if further changes are required use 'options(java.parameters = '-Xmx4g')' and change the value. This is required for bartMachine, restarting R may be required if analysis has taken place with rJava prior
> # Example Data
> my_data <- iris[1:100, 1:4]
> head(my_data, 5)
  Sepal.Length Sepal.Width Petal.Length Petal.Width
1          5.1         3.5          1.4         0.2
2          4.9         3.0          1.4         0.2
3          4.7         3.2          1.3         0.2
4          4.6         3.1          1.5         0.2
5          5.0         3.6          1.4         0.2
> # Example Labels
> my_labels <- as.character(iris[1:100, 5])
> unique(my_labels)
[1] "setosa"     "versicolor"
> # Partitioning Data
> my_partition = Partition(data = my_data,
+                          labels = my_labels)
Seed:114
> 
> # Creating a Training & Testing Model
> model_1 <- blkbox(data = my_partition)
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
foreach: simple, scalable parallel programming from Revolution Analytics
Use Revolution R for scalability, fault tolerance and more.
http://www.revolutionanalytics.com
Loaded glmnet 2.0-5

Loading required package: lattice
Loading required package: ggplot2
Find out what's changed in ggplot2 at
http://github.com/tidyverse/ggplot2/releases.
Loading required package: pamr
Loading required package: cluster
Loading required package: survival

Attaching package: ‘survival’

The following object is masked from ‘package:caret’:

    cluster

Loading required package: nnet
Error: 'predict' is not an exported object from 'namespace:xgboost'
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
 [1] LC_CTYPE=en_AU.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=en_AU.UTF-8           LC_COLLATE=en_AU.UTF-8       
 [5] LC_MONETARY=en_AU.UTF-8       LC_MESSAGES=en_AU.UTF-8      
 [7] LC_PAPER=en_AU.UTF-8          LC_NAME=en_AU.UTF-8          
 [9] LC_ADDRESS=en_AU.UTF-8        LC_TELEPHONE=en_AU.UTF-8     
[11] LC_MEASUREMENT=en_AU.UTF-8    LC_IDENTIFICATION=en_AU.UTF-8

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

other attached packages:
 [1] nnet_7.3-12     pamr_1.55       survival_2.41-3 cluster_2.0.6   caret_6.0-73   
 [6] ggplot2_2.2.1   lattice_0.20-35 glmnet_2.0-5    foreach_1.4.3   Matrix_1.2-8   
[11] blkbox_1.0     

loaded via a namespace (and not attached):
 [1] zoo_1.8-0           modeltools_0.2-21   coin_1.1-3          reshape2_1.4.2     
 [5] splines_3.3.3       rJava_0.9-8         colorspace_1.3-2    stats4_3.3.3       
 [9] mgcv_1.8-17         ModelMetrics_1.1.0  e1071_1.6-8         nloptr_1.0.4       
[13] xgboost_0.6-4       multcomp_1.4-6      plyr_1.8.4          stringr_1.2.0      
[17] MatrixModels_0.4-1  munsell_0.4.3       kknn_1.3.1          gtable_0.2.0       
[21] mvtnorm_1.0-6       codetools_0.2-15    strucchange_1.5-1   SparseM_1.76       
[25] quantreg_5.29       pbkrtest_0.4-7      parallel_3.3.3      class_7.3-14       
[29] itertools_0.1-3     TH.data_1.0-8       bartMachine_1.2.3   Rcpp_0.12.10       
[33] party_1.2-3         scales_0.4.1        lme4_1.1-12         stringi_1.1.5      
[37] grid_3.3.3          tools_3.3.3         sandwich_2.3-4      magrittr_1.5       
[41] missForest_1.4      lazyeval_0.2.0      tibble_1.3.0        randomForest_4.6-12
[45] car_2.1-4           MASS_7.3-45         data.table_1.10.4   bartMachineJARs_1.0
[49] minqa_1.2.4         iterators_1.0.8     igraph_1.0.1        nlme_3.1-131       
[53] compiler_3.3.3      
zacdav commented 7 years ago

i've been in the middle of getting an update done for the package. I have the rest of the day free and i'll work on getting it fixed up for you :)

zacdav commented 7 years ago

fixed

drejom commented 7 years ago

Cool, thanks Zac. I tried running the code in the vignette, but the plots suggest something aint right- the ROC plots are from the iris data, right? plot

zacdav commented 7 years ago

whats wrong with the plots? its predicting 1.0 AUROC?

zacdav commented 7 years ago

I should note that the images in the vignette aren't actually from the iris data if that was your concern. I should add that as a footnote. The vignette image was intended to show a more real world image with some simple code.

drejom commented 7 years ago

Ahh, yep, was just a bit confused by that; will give it a crack with some expression data. Cheers!

zacdav commented 7 years ago

No problem, please let us know if theres any workflow improvement ideas you have!