[R] Logistic regression over LOOCV

2013-10-18 Thread Nicolás Sánchez
Hello all. I have this code: myLOOCV - function(myformula, data) { Y - all.vars(myformula)[1] Scores- numeric(length(data[,1])) for (i in 1:length(data[,1])) { train - data[-i,] test - data[i,] myModel - lrm(myformula, train) Scores[i] -

[R] Aggregate function Bagging

2013-04-14 Thread Nicolás Sánchez
Good morning all. I am doing bagging with package caret. I need bagging for a classification problem. I am working with bag. bag(x, y, B = 10, vars = NULL, bagControl = bagControl(), ...) bagControl(fit = NULL, predict = NULL, aggregate = NULL, downSample =

[R] Problem with caret

2013-04-11 Thread Nicolás Sánchez
Hello all. I am using method bag() to develop a bagging with my dataset. When I do bag( dataP, dataP$Score, B=10) I obtain this error: error en bag.default(Score ~ ., data = dataP, B = 10) : entrada en evaluacion: recursivo por defecto o problemas anteriores? ( in english, evaluating

Re: [R] Applying bagging in classifiers

2013-04-10 Thread Nicolás Sánchez
Any help? Thanks! 2013/4/8 Nicolás Sánchez eni...@gmail.com Hello! Does anyone know how to apply bagging for SVM? ( for example) I am using adabag package to execute bagging but this method, bagging, works with classification trees. I would like to apply my bagging to other classifiers

[R] Applying bagging in classifiers

2013-04-08 Thread Nicolás Sánchez
Hello! Does anyone know how to apply bagging for SVM? ( for example) I am using adabag package to execute bagging but this method, bagging, works with classification trees. I would like to apply my bagging to other classifiers as SVM,RNA or KNN. Has anyone do it? Thanks!! [[alternative

Re: [R] Cannot scale data

2013-04-07 Thread Nicolás Sánchez
Of Course, that's the solution! Thankss! 2013/4/6 Rui Barradas ruipbarra...@sapo.pt Hello, Can't you simply call svm() with scale = FALSE ? If the variable is constant, it cannot be scaled to unit variance (and zero mean). Hope this helps, Rui Barradas Em 06-04-2013 17:19, Nicolás

[R] Working with createFolds

2013-04-07 Thread Nicolás Sánchez
Hello! I have a question. I am working with createFolds: folds- trainControl(method='cv', index=createFolds(data$Score,list = TRUE)) I need to iterate over folds to extract the indexes from each fold. For example, if I do folds$index$Fold01, it contains: 5 11 17 29 44 50 52 64 65 I

Re: [R] Working with createFolds

2013-04-07 Thread Nicolás Sánchez
Anyone? ;-) 2013/4/7 Nicolás Sánchez eni...@gmail.com Hello! I have a question. I am working with createFolds: folds- trainControl(method='cv', index=createFolds(data$Score,list = TRUE)) I need to iterate over folds to extract the indexes from each fold. For example, if I do folds

[R] Cannot scale data

2013-04-06 Thread Nicolás Sánchez
Hello! I have this error in R: In svm.default(x, y, scale = scale, ..., na.action = na.action) : Variable(s) ‘X.11.’ constant. Cannot scale data. Of course, I have a column of 25 rows where the values are always 0. Why it is not possible to have a column with 0? I need this column because is

[R] CV in SVM

2013-04-05 Thread Nicolás Sánchez
Good morning. I am using package e1071 to develop a SVM model. My code is: x - subset(dataset, select = -Score) y - dataset$Score model - svm(x, y,cross=10) print(model) summary(model) As 10-CV produces 10 models, I need two things: 1) To have access to each model from 10-CV.

[R] Cross Validation with SVM

2013-04-05 Thread Nicolás Sánchez
Good morning. I am using package e1071 to develop a SVM model. My code is: x - subset(dataset, select = -Score) y - dataset$Score model - svm(x, y,cross=10) print(model) summary(model) As 10-CV produces 10 models, I need two things: 1) To have access to each model from 10-CV.

[R] Extract the accuracy of 10-CV

2013-04-04 Thread Nicolás Sánchez
Hello guys! I am working with some classifiers ( SVM,C4.5,RNA,etc) using 10-C.V. Once I have the model of each one, I make the validation of these models in one dataset. Then,with my model and the dataset, I extract a confusion matrix to know the capacity of prediction from the model. And

Re: [R] Extract the accuracy of 10-CV

2013-04-04 Thread Nicolás Sánchez
Anyone? Thanks! 2013/4/4 Nicolás Sánchez eni...@gmail.com Hello guys! I am working with some classifiers ( SVM,C4.5,RNA,etc) using 10-C.V. Once I have the model of each one, I make the validation of these models in one dataset. Then,with my model and the dataset, I extract a confusion

[R] Creating new instances from original ones

2013-03-31 Thread Nicolás Sánchez
I have a question about data mining. I have a dataset of 70 instances with 14 features that belong to 4 classes. As the number of each class is not enough to obtain a good accuracy using some classifiers( svm, rna, knn) I need to oversampling the number of instances of each class. I have heard

Re: [R] Creating new instances from original ones

2013-03-31 Thread Nicolás Sánchez
, Nicolás. 2013/3/31 Prof. Dr. Matthias Kohl matthias.k...@stamats.de see function SMOTE in package DMwR hth Matthias On 31.03.2013 10:46, Nicolás Sánchez wrote: I have a question about data mining. I have a dataset of 70 instances with 14 features that belong to 4 classes. As the number

[R] Oversampling in R

2013-03-30 Thread Nicolás Sánchez
Hello! I have a doubt about Data Mining, perhaps this message would have to be commented in a data-mining forum I am with a classification problem. I have 4 classes: g0,g1,g2,g3. These are my factors. The question is : Is it possible to apply oversampling in a problem with more than 2 classes ?

Re: [R] LOOCV over SVM,KNN

2013-03-24 Thread Nicolás Sánchez
Thanks you very much! Your help has been very useful! Regards! 2013/3/23 mxkuhn mxk...@gmail.com train() in caret. See http://caret.r-forge.r-project.org/ Also, the C5.0 function in the C50 is much more effective than J48. Max On Mar 23, 2013, at 2:57 PM, Nicolás Sánchez eni

[R] LOOCV over SVM,KNN

2013-03-23 Thread Nicolás Sánchez
Good afternoon. I would like to know if there is any function in R to do LOOCV with these classifiers: 1)SVM 2)Neural Networks 3)C4.5 ( J48) 4)KNN Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Features Selection using RWeka

2013-03-14 Thread Nicolás Sánchez
Does this package include any methods to do features selection? Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Accuracy of some classifiers

2013-03-14 Thread Nicolás Sánchez
Precision. 2013/3/14 Patrick Connolly p_conno...@slingshot.co.nz On Wed, 13-Mar-2013 at 09:04AM +0100, Nicolás Sánchez wrote: | I am using machine learning for one researching. I am using some | classifiers with 5-fold CV . I would like to know how it is possible to | extract the accuracy

[R] Accuracy of some classifiers

2013-03-13 Thread Nicolás Sánchez
I am using machine learning for one researching. I am using some classifiers with 5-fold CV . I would like to know how it is possible to extract the accuracy, for example, for KNN,neural networks and J48, for each one of 5-fold because when I apply CV to my classifier, I obtain the mean accuracy

[R] Numeric Class to Nominal class

2013-03-13 Thread Nicolás Sánchez
Hello everybody! I have a question. I am working with R and I am loading a .txt from my computer. This file contains a set of features from patients with numerical values and the score, that determines the gravity of the disease( from 0 to 3). Due to I want to obtain a classification of my