search for: confusionmatrix

Displaying 18 results from an estimated 18 matches for "confusionmatrix".

2010 Nov 23
5
cross validation using e1071:SVM
...ethod. I know that there is an option (?cross?) for cross validation but still I wanted to make a function to Generate cross-validation indices using pls: cvsegments method. ##################################################################### Code (at the end) Is working fine but sometime caret:confusionMatrix gives following error: stat_result<- confusionMatrix(pred_true1,species_test) Error in confusionMatrix.default(pred_true1, species_test) : The data and reference factors must have the same number of levels My data: total number=260 Class = 6 ##################################### Sorry if...
2011 Mar 16
1
object not found whilst loading namespace
I've been updating a package and, when installing a local devel version, I get an error "object 'confusionMatrix' not found whilst loading namespace". Looking around online, it appears that this might be related to loading a specific RData file, but it doesn't seem to be the case AFAICT. I've installed the devel version in the last week without issues and the confusionMatrix code has been to...
2012 Aug 15
2
sensitivity and specificity in svyglm??
Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives these results but not how to apply it to svyglm. thanks [[alternative HTML version deleted]]
2018 Feb 26
3
Random Seed Location
...ech[-train, ] E. Use the naiveBayes function in the e1071 package to fit the model. > model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) > prob <- predict(model, newdata = InvestTechVal, type = ?raw?) > pred <- ifelse(prob[, 2] >= 0.3, 1, 0) F. Use the confusionMatrix function in the caret package to output the confusion matrix. > confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = ?everything?, positive = ?1?) > accuracy <- confMtr$overall[1] > valError <- 1 ? accuracy > confMtr G. Classify the 18 new (out-of-sample) readers...
2009 Jan 25
0
caret version 4.06 released
...ckage now contains a function (splsda) that extends the spls function to classification (in the same manner than caret's plsda function extends plsr). Also, fixed a bug where the MSE (instead of RMSE) was reported for random forest OOB resampling There are more examples in ?train. Changes to confusionMatrix, sensitivity, specificity and the predicative value functions: - each was made more generic with default and table methods - confusionMatrix "extractor" functions for matrices and tables were added - the pos/neg predicted value computations were changed to incorporate prevalence - pr...
2009 Jan 25
0
caret version 4.06 released
...ckage now contains a function (splsda) that extends the spls function to classification (in the same manner than caret's plsda function extends plsr). Also, fixed a bug where the MSE (instead of RMSE) was reported for random forest OOB resampling There are more examples in ?train. Changes to confusionMatrix, sensitivity, specificity and the predicative value functions: - each was made more generic with default and table methods - confusionMatrix "extractor" functions for matrices and tables were added - the pos/neg predicted value computations were changed to incorporate prevalence - pr...
2018 Feb 27
0
Random Seed Location
...yes function in the e1071 package to fit the model. > > > model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) > > prob <- predict(model, newdata = InvestTechVal, type = ?raw?) > > pred <- ifelse(prob[, 2] >= 0.3, 1, 0) > > F. Use the confusionMatrix function in the caret package to output the > confusion matrix. > > > confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = > ?everything?, positive = ?1?) > > accuracy <- confMtr$overall[1] > > valError <- 1 ? accuracy > > confMtr > > G....
2018 Mar 04
3
Random Seed Location
...unction in the e1071 package to fit the model. > >> model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) >> prob <- predict(model, newdata = InvestTechVal, type = ?raw?) >> pred <- ifelse(prob[, 2] >= 0.3, 1, 0) > > F. Use the confusionMatrix function in the caret package to output the > confusion matrix. > >> confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = > ?everything?, positive = ?1?) >> accuracy <- confMtr$overall[1] >> valError <- 1 ? accuracy >> confMtr > &g...
2009 Jul 10
1
pcaNNet confusion
Hi. Can anyone suggest how to use the output of pcaNNet() to construct a confusion matrix possibly using confusionMatrix()? Thank you. -- View this message in context: http://www.nabble.com/pcaNNet-confusion-tp24422000p24422000.html Sent from the R help mailing list archive at Nabble.com.
2008 Sep 06
3
how to address last and all but last column in dataframe
...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I recently learned, that I can easily create a confusion matrix out of this data using the following commands: pairs<-data.frame(pred=factor(unlist(input[2:21])),ref=factor(input[,22])) pred<-pairs$pred ref <- pairs$ref library (caret) confusionMatrix(pred, ref, positive=1) - where column 21 is the reference/goldstandard. My problem is now, that I analyse data.frames with an unknown count of columns. So to get rid of the first and last column for the "pred" variable and to select the last column for the "ref" variable, I ha...
2018 Mar 04
0
Random Seed Location
...ackage to fit the model. > > > >> model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) > >> prob <- predict(model, newdata = InvestTechVal, type = ?raw?) > >> pred <- ifelse(prob[, 2] >= 0.3, 1, 0) > > > > F. Use the confusionMatrix function in the caret package to output the > > confusion matrix. > > > >> confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = > > ?everything?, positive = ?1?) > >> accuracy <- confMtr$overall[1] > >> valError <- 1 ? accuracy >...
2018 Mar 04
2
Random Seed Location
...>> > >> >> model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) >> >> prob <- predict(model, newdata = InvestTechVal, type = ?raw?) >> >> pred <- ifelse(prob[, 2] >= 0.3, 1, 0) >> > >> > F. Use the confusionMatrix function in the caret package to output the >> > confusion matrix. >> > >> >> confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = >> > ?everything?, positive = ?1?) >> >> accuracy <- confMtr$overall[1] >> >> valError...
2018 Mar 04
0
Random Seed Location
...>>>>> model <- naiveBayes(`Purchase (1=yes, 0=no)` ~ ., data = InvestTechTrain) >>>>> prob <- predict(model, newdata = InvestTechVal, type = ?raw?) >>>>> pred <- ifelse(prob[, 2] >= 0.3, 1, 0) >>>> >>>> F. Use the confusionMatrix function in the caret package to output the >>>> confusion matrix. >>>> >>>>> confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = >>>> ?everything?, positive = ?1?) >>>>> accuracy <- confMtr$overall[1] >>&gt...
2011 Mar 18
2
Need help with error
Hi R users, I am getting the following error when using the splsda function in R v2.12.1: "Error in switch(classifier, logistic = { : EXPR must be a length 1 vector" What does this mean and how do I fix this? Thank you in advance! Best, Savi
2018 Mar 05
1
Random Seed Location
...0=no)` ~ ., data = >>>>>> InvestTechTrain) >>>>>> prob <- predict(model, newdata = InvestTechVal, type = ?raw?) >>>>>> pred <- ifelse(prob[, 2] >= 0.3, 1, 0) >>>>> >>>>> >>>>> F. Use the confusionMatrix function in the caret package to output >>>>> the >>>>> confusion matrix. >>>>> >>>>>> confMtr <- confusionMatrix(pred,unlist(InvestTechVal[, 3]),mode = >>>>> >>>>> ?everything?, positive = ?1?) >>...
2011 Jun 22
1
caret's Kappa for categorical resampling
Hello, When evaluating different learning methods for a categorization problem with the (really useful!) caret package, I'm getting confusing results from the Kappa computation. The data is about 20,000 rows and a few dozen columns, and the categories are quite asymmetrical, 4.1% in one category and 95.9% in the other. When I train a ctree model as: model <- train(dat.dts,
2011 Feb 21
3
ROC from R-SVM?
*Hi, *Does anyone know how can I show an *ROC curve for R-SVM*? I understand in R-SVM we are not optimizing over SVM cost parameter. Any example ROC for R-SVM code or guidance can be really useful. Thanks, Angel. [[alternative HTML version deleted]]
2010 Apr 23
3
Practical work with logistic regression
Dear all, I have a couple of short noob questions for whoever can take them. I'm from a very non-stats background so sorry for offending anybody with stupid questions ! :-) I have been using logistic regression care of glm to analyse a binary dependent variable against a couple of independent variables. All has gone well so far. In my work I have to compare the accuracy of analysis to a C4.5