Skip to content

MSE with parallel computation #10

@aparrar1

Description

@aparrar1

I am using quantregForest with parallel computation and I have noticed that the mean squared error values are not getting calculated when using the parallel option. I am not sure why this is happening, looking at the parallelRandomForest code it looks like mse should be part of the output of the function.

Following the example in the documentation:

library("randomForest")
library("quantregForest")
library("parallel")

data(airquality)
set.seed(1)
airquality <- airquality[ !apply(is.na(airquality), 1,any), ]
n <- nrow(airquality)
indextrain <- sample(1:n,round(0.6*n),replace=FALSE)
Xtrain <- airquality[ indextrain,2:6]
Ytrain <- airquality[ indextrain,1]

qrf <- quantregForest(x=Xtrain, y=Ytrain, keep.inbag = TRUE, importance=TRUE)
qrf$mse
plot(qrf)

qrf <- quantregForest(x=Xtrain, y=Ytrain, keep.inbag = TRUE, importance=TRUE, nthreads=10)
qrf$mse
NULL
plot(qrf)
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :'data' must be of a vector type, was 'NULL'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions