0
dane <- read.table(file = "http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wpbc.data",sep=",", dec = ".")

library(randomForest) 
library(cvTools) 
cv <- cvFit(randomForest,  x=dane[,-2], y=dane[,2], R=10, k=100, args=list(ntree=500),foldType = "random",cost = rmspe) 

enter image description here

Moumit
  • 8,314
  • 9
  • 55
  • 59
Taras Haliuk
  • 9
  • 1
  • 2

1 Answers1

1

The cvFit function is designed for numeric outcomes. Although randomForest has no difficulty with factor outcomes (in which case it does classification), the results are being processed by a function that expects a regression model.

IRTFM
  • 258,963
  • 21
  • 364
  • 487