_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
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

覈伎 蠍語伎? 蠏瑚碓. 螳 殊伎. れ螻 れ螻 れ れ朱 譟郁襷 れ 譟郁襷 れ 譟郁襷 れ 螳覃 蟇一. <伎危 語 (Grooks 1) 譴>