gboris / blkbox

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

Error in svm.default(x, y, scale = scale, ..., na.action = na.action) : object 'R_svmtrain' not found #54

Closed BioFengtian closed 7 years ago

BioFengtian commented 7 years ago

Hi

Just read your awesome paper about this cool tools. But I am having trouble running the example code from the vignette. I searched google and tried install and uninstall the package multiple times but failed to fix it.

Many thanks!

Ray

library("blkbox", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2") 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:962

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-10

Loading required package: lattice Loading required package: ggplot2 Need help getting started? Try the cookbook for R: http://www.cookbook-r.com/Graphs/ 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 in svm.default(x, y, scale = scale, ..., na.action = na.action) : object 'R_svmtrain' not found

sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.5 LTS

Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.0 LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8
[4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=en_GB.UTF-8 LC_ADDRESS=en_GB.UTF-8
[10] LC_TELEPHONE=en_GB.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.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-76 ggplot2_2.2.1 lattice_0.20-35 [8] glmnet_2.0-10 foreach_1.4.3 Matrix_1.2-10 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 splines_3.4.0
[6] rJava_0.9-8 colorspace_1.3-2 stats4_3.4.0 mgcv_1.8-17 ModelMetrics_1.1.0 [11] e1071_1.6-8 nloptr_1.0.4 multcomp_1.4-6 plyr_1.8.4 stringr_1.2.0
[16] MatrixModels_0.4-1 munsell_0.4.3 kknn_1.3.1 gtable_0.2.0 mvtnorm_1.0-6
[21] codetools_0.2-15 strucchange_1.5-1 SparseM_1.77 quantreg_5.33 pbkrtest_0.4-7
[26] parallel_3.4.0 class_7.3-14 itertools_0.1-3 TH.data_1.0-8 bartMachine_1.2.3
[31] Rcpp_0.12.10 party_1.2-3 scales_0.4.1 lme4_1.1-13 stringi_1.1.5
[36] grid_3.4.0 tools_3.4.0 sandwich_2.3-4 magrittr_1.5 missForest_1.4
[41] lazyeval_0.2.0 tibble_1.3.0 randomForest_4.6-12 car_2.1-4 MASS_7.3-47
[46] bartMachineJARs_1.0 minqa_1.2.4 iterators_1.0.8 igraph_1.0.1 nlme_3.1-131
[51] compiler_3.4.0

zacdav commented 7 years ago

This looks to be very particular to the e1071 package. I would specifically try and reinstall that package and try once more. Otherwise i'll investigate myself later. If it is e1071 there may not be much we can do at the moment other than exclude the SVM model from any analysis for the time being. You can use the exclude = "SVM" to do so.

BioFengtian commented 7 years ago

Thanks for your suggestions! fixed with re-install the e1071 package.