Dear Sunny Vic,

I am forwarding it to the list, to help the helpers :-)

bests..
milton

On Mon, Jun 8, 2009 at 12:41 PM, sunny vic <vss.0116@gmail.com> wrote:

> Hi Milton,
>   here you go
>
> X1=rnorm(11, 50, 10)
> X2=rnorm(11, 20, 10)
> X3=rnorm(11, 50, 60)
> X4=rnorm(11, 10, 2)
> X5=rnorm(11, 5, 22)
>
> x<-cbind(X1,X2,X3,X4,X5);
> y <- c(0, 0, 0,0,0,0,1,1,1,1,1) ;
>
> tc=trainControl(method="cv", number=10 );
> glmmat<-train(x,y,method="glmnet", trControl=tc);
> extractPrediction(list(glmmat,testX=x,testY = y));
>
> Error in models[[i]]$finalModel :
>   $ operator is invalid for atomic vectors
> __________________________________________________
>
> to give you more why I included list in the extractPrediction, without that
> it looks for a list of models , so I found that in the help and used list
> which eliminated that error and is now giving something new.
>
>
> ERROR without List in extractPrediction
>
> extractPrediction(glmmat,testX=x,testY = y);
>
> Error in models[[1]]$trainingData :
>   $ operator is invalid for atomic vectors
> _____________________________________________
>
> I am actually trying to get the confusion matrix so I can calculate the
> accuracy, sensitivity and specificity of the model
>
> cheers
> vss
>
>
> On Mon, Jun 8, 2009 at 10:42 AM, milton ruser <milton.ruser@gmail.com>wrote:
>
>> Hi Sonny Vic,
>>
>> how about you send a reproducible code?
>>
>> cheers
>> milton
>>
>>   On Mon, Jun 8, 2009 at 11:25 AM, sunny vic <vss.0116@gmail.com> wrote:
>>
>>>  Hi all
>>>  I am using the caret package and having difficulty in obtaining the
>>> results
>>> using regression, I used the glmnet to model and trying to get the
>>> coefficients and the model parameters  I am trying to use the
>>> extractPrediction to obtain a confusion matrix and it seems to be giving
>>> me
>>> errors.
>>>
>>>
>>> x<-read.csv("x.csv", header=TRUE);
>>> y<-read.csv("y.csv", header=TRUE);
>>> tc=trainControl(method="cv", number=10 );
>>> glmmat<-train(x,y,method="glmnet", trControl=tc);
>>> extractPrediction(list(glmmat,testX=x,testY = y));
>>>
>>> any help would be great
>>> thanks
>>> vss
>>>
>>>        [[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
>>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>

	[[alternative HTML version deleted]]


