From cf0fd8003c373bd9216823ff2065231696ddfbcb Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 19 May 2011 10:08:17 +0200 Subject: Set nu to 0.5 --- lib/algorithm.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/algorithm.rb') diff --git a/lib/algorithm.rb b/lib/algorithm.rb index 4cb80e3..fb5fd7f 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -178,7 +178,6 @@ module OpenTox sims = neighbors.collect{ |n| Algorithm.gauss(n[:similarity]) } # similarity values btwn q and nbors prediction = local_svm(neighbors, acts, sims, "svr", params) - LOGGER.debug "Prediction is: '" + prediction.to_s + "'." prediction = (take_logs ? 10**(prediction.to_f) : prediction.to_f) LOGGER.debug "Prediction is: '" + prediction.to_s + "'." @@ -254,7 +253,7 @@ module OpenTox # model + support vectors LOGGER.debug "Creating SVM model ..." - @r.eval "model<-ksvm(gram_matrix, y, kernel=matrix, type=\"nu-#{type}\", nu=0.8)" + @r.eval "model<-ksvm(gram_matrix, y, kernel=matrix, type=\"nu-#{type}\", nu=0.5)" @r.eval "sv<-as.vector(SVindex(model))" @r.eval "sims<-sims[sv]" @r.eval "sims<-as.kernelMatrix(matrix(sims,1))" -- cgit v1.2.3