0

I am trying to use the unbalanced package in R in an azure machine learning classification experiment.

The problem I'm running into is getting the package to be imported in R, specifically getting the mlr package dependency to be installed too.

I use the following R script to import the unbalanced package:

install.packages("src/colorspace_1.2-6.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/RColorBrewer_1.1-2.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/dichromat_2.0-0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/munsell_0.4.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/labeling_0.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/tibble_1.2.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/DBI_0.5-1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/BH_1.60.0-2.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/digest_0.6.10.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/gtable_0.2.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/scales_0.4.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/backports_1.0.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/chron_2.3-47.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/assertthat_0.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/jsonlite_1.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/magrittr_1.5.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/dplyr_0.5.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/lazyeval_0.2.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/htmltools_0.3.5.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/Rcpp_0.12.7.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/stringr_1.1.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/httpuv_1.3.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/mime_0.5.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/xtable_1.8-2.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/R6_2.1.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/sourcetools_0.1.5.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/BBmisc_1.10.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/ggplot2_2.1.0.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/ParamHelpers_1.9.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/stringi_1.1.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/checkmate_1.8.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/data.table_1.9.6.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/ggvis_0.4.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/parallelMap_1.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/plyr_1.8.4.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/reshape2_1.4.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/shiny_0.14.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/iterators_1.0.8.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/mlr_2.9.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/foreach_1.4.3.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/doParallel_1.0.10.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/FNN_1.1.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/RANN_2.5.zip", lib = ".", repos = NULL, verbose = TRUE)
install.packages("src/unbalanced_2.0.zip", lib = ".", repos = NULL, verbose = TRUE)
library(unbalanced, lib.loc=".", verbose=TRUE)

I have a zip archive of those zipped packages connected to the Execute R script module in Azure ML like this:

enter image description here

Also, the archive contains the mlr package and its dependencies, as the archive was created on the archived packages in

C:\Users\my_user\AppData\Local\Temp\RtmpU3WpI6\downloaded_packages

I am using CRAN R 3.1.0 R version in Azure ML.

I get the following error:

Error 0063: The following error occurred during evaluation of R script:
---------- Start of error message from R ----------
package 'mlr' could not be loaded

Changing to Microsoft R Open 3.2.2 doesn't work at all, too, as the error code says that the mlr package cannot be found.

The order I install those packages is the same error in which they are installed in R Studio whenever I perform a fresh

install.packages("unbalanced")

I really need to use this package for my classification. Any ideas about solving this error?

Thank you!

  • An idea would be to download the *.zip file from CRAN and install it by hand on your machine. – J_F Sep 16 '16 at 12:06
  • Already installed the unbalanced package on my machine, works just fine, but I need to do it on azure ML aswell... – Laurentiu Diaconu Sep 19 '16 at 06:47
  • When you installed it locally, were you using the same version of R (ie. 3.1.0 or 3.2.2)? Some packages are not backward compatible so you may need to go into the archives and find an older version of the packages you need. Also, you don't need to install the packages already in AML (ex. dplyr). – Barker Sep 30 '16 at 00:40
  • Check whether 'unbalanced' package in R is based on Java. If it so, that is not supported with AzureML yet. Azure ML sandbox is not supporting JVM right now. That might be the reason for this error. – Haritha Thilakarathne Oct 17 '16 at 07:11

0 Answers0