Running examples in ‘RMOA-Ex.R’ failed
The error most likely occurred in:

> ### Name: predict.MOA_trainedmodel
> ### Title: Predict using a MOA classifier, MOA regressor or MOA recommender
> ###   on a new dataset
> ### Aliases: predict.MOA_trainedmodel
> 
> ### ** Examples
> 
> ## Hoeffdingtree
> hdt <- HoeffdingTree(numericEstimator = "GaussianNumericAttributeClassObserver")
> data(iris)
> ## Make a training set
> iris <- factorise(iris)
> traintest <- list()
> traintest$trainidx <- sample(nrow(iris), size=nrow(iris)/2)
> traintest$trainingset <- iris[traintest$trainidx, ]
> traintest$testset <- iris[-traintest$trainidx, ]
> irisdatastream <- datastream_dataframe(data=traintest$trainingset)
> ## Train the model
> hdtreetrained <- trainMOA(model = hdt, 
+  Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, 
+  data = irisdatastream)
> 
> ## Score the model on the holdoutset
> scores <- predict(hdtreetrained, 
+    newdata=traintest$testset[, c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width")], 
+    type="response")
> str(scores)
 chr [1:75] "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" ...
> table(scores, traintest$testset$Species)
            
scores       setosa versicolor virginica
  setosa         22          0         0
  versicolor      0         28         2
  virginica       0          2        21
> scores <- predict(hdtreetrained, newdata=traintest$testset, type="votes")
> head(scores)
        setosa   versicolor    virginica
[1,] 2.1116956 5.814254e-24 3.626837e-23
[2,] 1.0692703 3.750871e-24 4.501561e-24
[3,] 0.9214671 1.344403e-22 2.681703e-23
[4,] 2.0708417 7.756787e-25 1.596365e-23
[5,] 2.3213611 8.046016e-23 9.878775e-23
[6,] 0.2389012 1.283804e-23 3.152946e-24
> 
> ## Prediction based on recommendation engine
> require(recommenderlab)
Loading required package: recommenderlab
Loading required package: Matrix
Loading required package: arules

Attaching package: ‘arules’

The following objects are masked from ‘package:base’:

    abbreviate, write

Loading required package: proxy

Attaching package: ‘proxy’

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

    as.matrix

The following objects are masked from ‘package:stats’:

    as.dist, dist

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

    as.matrix

Loading required package: registry
> data(MovieLense)
> x <- getData.frame(MovieLense)
> x$itemid <- as.integer(as.factor(x$item))
> x$userid <- as.integer(as.factor(x$user))
> x$rating <- as.numeric(x$rating)
> x <- head(x, 2000)
> 
> movielensestream <- datastream_dataframe(data=x)
> movielensestream$get_points(3)
    user              item rating itemid userid
1      1  Toy Story (1995)      5   1525      1
453    1  GoldenEye (1995)      3    618      1
584    1 Four Rooms (1995)      4    555      1
> 
> ctrl <- MOAoptions(model = "BRISMFPredictor", features = 10)
> brism <- BRISMFPredictor(control=ctrl)
> mymodel <- trainMOA(model = brism, rating ~ userid + itemid, 
+  data = movielensestream, chunksize = 1000, trace=TRUE)
2021-08-30 12:24:34 Running chunk 1: instances 0:1000
2021-08-30 12:24:37 Running chunk 2: instances 1000:2000
2021-08-30 12:24:39 Running chunk 3: instances 2000:3000
> 
> overview <- summary(mymodel$model)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  : 
  java.lang.reflect.InaccessibleObjectException: Unable to make public java.lang.Object[] java.util.HashMap$KeySet.toArray() accessible: module java.base does not "opens java.util" to unnamed module @1f36e637
Calls: summary ... summary.MOA_recommender -> <Anonymous> -> .jrcall -> .jcall -> .jcheck
Execution halted