Results (LSS vs Weka SVM vs R SVM)

Introduction


LSS machine has been tested on various data and compared with real SVM machines in Weka and R. LSS used various distance measurement formulas, while Weka and R were left with default settings. How it was tested in R can be seen in the code snipped below. 

#custom function to measure precision
precision <- function(predictedLabel, goodLabel){
len<-length(predictedLabel)
tot<-0
                for(i in 1:len) {
                                if (predictedLabel[i]==goodLabel[i]) {
                                                tot<-tot+1
                                                #print(paste("Positive", "Predicted--->",predictedLabel[i],goodLabel[i],"<---Actual", sep = " "))
                                }else{
                                                #print(paste("Negative","Predicted--->",predictedLabel[i],goodLabel[i],"<---Actual", sep = " "))
                                }
                }
                pct= tot/len*100
                print(paste(signif(pct,digits=4),"%", sep = ""))
}

#load library
library(e1071)

#load csv file
myFil<-"AID1608red_train.csv"
myDir<-"C:/Users/Ubaby/Desktop/BIO DATA/readyToTest/bioassay/"
dir<-paste(myDir, myFil, sep = "")
data=read.csv(dir, TRUE,",")

#assign variables, class label is a name of attribute, but caught as whole column
x <- data
y <- Outcome ~ .

#train
model <- svm(y,x)

#predict
pred <- predict(model, x)

#measure precision
precision(data[[length(data)]],pred)

Prediction precision table of LSS, Weka SVM and R SVM on various biological data

Figure t1. Table of prediction precision results for LSS vs Weka SVM vs R SVM (Source: Ubaby, 2016)






Figure d1. Diagram of prediction precision vs size of data, results for LSS vs Weka SVM vs R SVM (Source: Ubaby, 2016)
Figure d2. Diagram of prediction precision with data names, results for LSS vs Weka SVM vs R SVM (Source: Ubaby, 2016)


No comments:

Post a Comment