Your SlideShare is downloading. ×
0
R: SVMsesejun@is.ocha.ac.jp     2010/12/08
SVM> iris.train <- read.table("iris_train.csv", sep=",", header=T)> iris.test <- read.table("iris_test.csv", sep=",", head...
> iris.model <- svm(iris.train[1:4], iris.train$Class, kernel=”linear”)> iris.pred <- predict(iris.model, iris.test[1:4])>...
41. USPS    1. USPS                        SVM         radial    2. K-NN    3.                          SVM K-NN•         ...
Upcoming SlideShare
Loading in...5
×

Datamining r 4_5th

536

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
536
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
34
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Datamining r 4_5th"

  1. 1. R: SVMsesejun@is.ocha.ac.jp 2010/12/08
  2. 2. SVM> iris.train <- read.table("iris_train.csv", sep=",", header=T)> iris.test <- read.table("iris_test.csv", sep=",", header=T)> library("e1071")> iris.model <- svm(iris.train[1:4], iris.train$Class)> iris.pred <- predict(iris.model, iris.test[1:4])> table(iris.pred, iris.test$Class)iris.pred Iris-setosa Iris-versicolor Iris-virginica Iris-setosa 7 0 0 Iris-versicolor 0 9 0 Iris-virginica 0 0 14 2
  3. 3. > iris.model <- svm(iris.train[1:4], iris.train$Class, kernel=”linear”)> iris.pred <- predict(iris.model, iris.test[1:4])> table(iris.pred, iris.test$Class)iris.pred Iris-setosa Iris-versicolor Iris-virginica Iris-setosa 7 0 0 Iris-versicolor 0 9 0 Iris-virginica 0 0 14 3
  4. 4. 41. USPS 1. USPS SVM radial 2. K-NN 3. SVM K-NN• 1 6 15:00 ( ) 4
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×