<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hola a todos,<BR> <BR>Estoy utilizando la libreria e1071 para clasificar unos datos con svm. y me da el siguiente error:<BR> <BR>Error en table(pred, true.y) : all arguments must have the same length<BR> <BR> <BR>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:<BR> <BR>library(e1071)<BR>library(class)<BR>memory.limit(size=4000)<BR> <BR>#leyendo el archivo con el test<BR>test<-read.table("test.txt", header=TRUE)<BR>#convirtiendo a valores categoricos<BR>test$classes<-as.factor(test$classes)<BR># leyendo los datos de entrenamiento<BR>calibrate<-read.table("calibration.txt", header=TRUE)<BR>calibrate$calibration<-as.factor(calibrate$calibration)<BR># calibracion del modelo svm<BR>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))<BR> <BR> <BR>Muchas gracias y saludos<BR> <BR>Víctor.<BR>                                      </body>
</html>