_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › SupportVectorMachines

library("kernlab")
model <- ksvm(factor(is_out) ~., data=training, kernel = "rbfdot")
pred <- predict(model, newdata=test2, type="response")             
confusionMatrix(pred, test2$is_out)     


library(e1071)
tunemodel <- tune.svm(factor(is_out) ~., data=training, gamma = 2^(-4:0), cost = 2^(-2:2))
tunemodel

model  <- svm(factor(is_out) ~ ., data = training, kernel = "radial" )
pred <- predict(model, newdata=test)
table(pred, test$is_out)

pred <- predict(model, newdata=test, probability = T)
confusionMatrix(ifelse(attr(pred, "probabilities")[,2] >= 0.7, 1, 0), test$is_out)


model <- svm(factor(is_out) ~., data=training, method="class", probability=T, class.weights=c("1"=0.45, "0"=0.55))
pred <- predict(model, newdata=test2, type="class")
confusionMatrix(pred, test2$is_out)


蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

一 レ . 蠏碁覃 轟蟆 る 螳 殊 襷 襷譟煙る 蟆企. 豺蟲れ 轟 襦 轟 蠏碁れ蟆 譴る 轟 螻 至鍵 蠏碁れ 襦 譬 豺蟲れ 譴 蟆企. 襦燕襦郁 襷 豺蟲襯 螳讌る 豺蟲螳 企. (企 るΠろ "蟆壱狩讌 讀蟇一"筝)