ohdatamineDISC2

Knncv8 irisknncv8 cl csv c 47 0 3 s 0 50 0 v

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 8, prob = TRUE) iris.knncv12=knn.cv(train, cl, k = 12, prob = TRUE) table(cl,iris.knncv2) iris.knncv2 cl csv c 47 0 3 s 0 50 0 v 5 0 45 > table(cl,iris.knncv8) iris.knncv8 . . . . . . cl csv c 47 0 3 s 0 50 0 v 2 0 48 > table(cl,iris.knncv12) iris.knncv12 cl csv c 47 0 3 s 0 50 0 v 3 0 47 classifier <- IBk(class ~ ., data = iris, control = Weka_control(K = 1 > evaluate_Weka_classifier(classifier, numFolds = 10) === 10 Fold Cross Validation === === Summary === Correctly Classified Instances 144 96 % Incorrectly Classified Instances 6 4 % Kappa statistic 0.94 Mean absolute error . 0.0409 . . . . . Root mean squared error Relative absolute error Root relative squared error Coverage of cases (0.95 level) Mean rel. region size (0.95 level) Total Number of Instances === Confusion Matrix === abc <-- classified as 50 0 0 | a = Iris-setosa 0 48 2 | b = Iris-versicolor 0 4 46 | c = Iris-virginica 0.1547 9.2036 32.8234 98.6667 37.7778 150 > evaluate_Weka_classifier(classifier, numFolds === 150 Fold Cross Validation === === Summary === Correctly Classified Instances 144 Incorrectly Classified Instances 6 Kappa statistic 0.94 Mean absolute error 0.0414 Root mean squared error 0.1473 Relative absolute error 9.2526 Root relative squared error 31.043 Coverage of cases (0.95 level) .99.3333 . % % % % = 150) 96 4 % % % . . % % . . Mean rel. region size (0.95 level) Total Number of Instances === Confusion Matrix === abc <-- classified as 50 0 0 | a = Iris-setosa 0 48 2 | b = Iris-versicolor 0 4 46 | c = Iris-virginica 38.8889 % 150 . . . . . . diab.ld.cv=lda(diab[,1:5],grouping=diab[,6],CV=T) names(diab.ld) [1] "class" "posterior" "call" > table(diab.ld.cv$class,diab[,6]) 123 1 25 0 0 2 6 30 3 3 1 6 73 diab.ld=lda(diab[,1:5],grouping=diab[,6]) names(diab.ld) [1] "prior" "counts" "means" "scaling" "lev" "svd" "N" [8] "call" > table(predict(diab.ld,diab[,1:5])$class,diab[,6]) 123 1 26 0 0 2 5 31 3 3 1 5 73 . . . . . ....
View Full Document

This note was uploaded on 07/29/2011 for the course STAT 202 at Stanford.

Ask a homework question - tutors are online