[R-es] (sin asunto)

Víctor Rodríguez Galiano luxorvrg en hotmail.com
Mar Feb 22 20:25:28 CET 2011


Hola a todos,
 
Estoy utilizando la libreria e1071 para clasificar unos datos con svm. y me da el siguiente error:
 
Error en table(pred, true.y) : all arguments must have the same length
 
 
Os adjunto unos txt con los datos de entrenamiento y de test por si quereis echarles un vistazo. El código que uso es el siguiente:
 
library(e1071)
library(class)
memory.limit(size=4000)
 
#leyendo el archivo con el test
test<-read.table("test.txt", header=TRUE)
#convirtiendo a valores categoricos
test$classes<-as.factor(test$classes)
# leyendo los datos de entrenamiento
calibrate<-read.table("calibration.txt", header=TRUE)
calibrate$calibration<-as.factor(calibrate$calibration)
# calibracion del modelo svm
calibrate.rf<-tune.svm(calibration~B14+B15+B16+B17+B18+B19+B24+B25+B26, data=calibrate, validation.x = test, type = "C-classification", cachesize =4000, kernel="polynomial", degree=1, gamma = seq(0.05, 0.1, by=0.05), cost = seq(0.1, 0.2, by=0.1), tunecontrol = tune.control(sampling = "fix", fix = 1, best.model = TRUE, performances = FALSE))
 
 
Muchas gracias y saludos
 
Víctor.
 		 	   		  
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20110222/21ff793d/attachment-0001.html>
------------ próxima parte ------------
An embedded and charset-unspecified text was scrubbed...
Name: test.txt
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20110222/21ff793d/attachment-0002.txt>
------------ próxima parte ------------
An embedded and charset-unspecified text was scrubbed...
Name: calibration.txt
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20110222/21ff793d/attachment-0003.txt>


Más información sobre la lista de distribución R-help-es