From 8035d64e9f1c9d49d1ec947204f78534ecc21e64 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 30 Jan 2012 13:18:13 +0100 Subject: Prop always on, removed conf_stdev --- lazar.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lazar.rb b/lazar.rb index 65752ec..6fd12ef 100644 --- a/lazar.rb +++ b/lazar.rb @@ -105,8 +105,7 @@ post '/lazar/?' do lazar.prediction_algorithm = "Neighbors.#{params[:prediction_algorithm]}" if params[:prediction_algorithm] # Propositionalization - propositionalized = false - propositionalized = true if ( params[:propositionalized] != "false" && ( lazar.prediction_algorithm == "local_mlr_prop" || lazar.prediction_algorithm.include?("local_svm") ) ) + propositionalized = true # PC type pc_type = params[:pc_type] unless params[:pc_type].nil? @@ -115,10 +114,6 @@ post '/lazar/?' do min_train_performance = params[:min_train_performance].to_f if params[:min_train_performance] min_train_performance = 0.1 unless params[:min_train_performance] - # Conf_stdev --- To be removed?? - lazar.conf_stdev = ( (params[:conf_stdev] == "true") ? true : false ) - - -- cgit v1.2.3 From 165a82a504bf06136619af15ccc6e3be23c642fb Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 30 Jan 2012 16:17:00 +0100 Subject: Prop on not for wmv --- last-utils | 2 +- lazar.rb | 2 +- libfminer | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/last-utils b/last-utils index 8c02f7e..cf02384 160000 --- a/last-utils +++ b/last-utils @@ -1 +1 @@ -Subproject commit 8c02f7e71450cac6d8c5d7d34ecb620046b4ea46 +Subproject commit cf0238477127e54509b6ab8b5c38f50dd6ffce08 diff --git a/lazar.rb b/lazar.rb index 6fd12ef..7fa0f96 100644 --- a/lazar.rb +++ b/lazar.rb @@ -105,7 +105,7 @@ post '/lazar/?' do lazar.prediction_algorithm = "Neighbors.#{params[:prediction_algorithm]}" if params[:prediction_algorithm] # Propositionalization - propositionalized = true + propositionalized = (lazar.prediction_algorithm=="Neighbors.weighted_majority_vote" ? false : true) # PC type pc_type = params[:pc_type] unless params[:pc_type].nil? diff --git a/libfminer b/libfminer index 17932e8..f9e560d 160000 --- a/libfminer +++ b/libfminer @@ -1 +1 @@ -Subproject commit 17932e809c35c93374ed3d5fd19a313325c35b41 +Subproject commit f9e560dc0a7a5d5af439814ab5fa9ce027a025b7 -- cgit v1.2.3 From 0164d17d0fbb90a9dfbe755eb7a2e9b2e778d623 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 31 Jan 2012 08:12:03 +0100 Subject: nr_hits for all SVM formulations --- lazar.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazar.rb b/lazar.rb index 7fa0f96..81929c6 100644 --- a/lazar.rb +++ b/lazar.rb @@ -93,17 +93,17 @@ post '/lazar/?' do min_sim = params[:min_sim].to_f if params[:min_sim] min_sim = 0.3 unless params[:min_sim] + # Algorithm + lazar.prediction_algorithm = "Neighbors.#{params[:prediction_algorithm]}" if params[:prediction_algorithm] + # Nr Hits nr_hits = false - if params[:nr_hits] == "true" + if params[:nr_hits] == "true" || lazar.prediction_algorithm.include?("local_svm") lazar.feature_calculation_algorithm = "Substructure.match_hits" nr_hits = true end params[:nr_hits] = "true" if lazar.feature_calculation_algorithm == "Substructure.match_hits" #not sure if this line in needed - # Algorithm - lazar.prediction_algorithm = "Neighbors.#{params[:prediction_algorithm]}" if params[:prediction_algorithm] - # Propositionalization propositionalized = (lazar.prediction_algorithm=="Neighbors.weighted_majority_vote" ? false : true) -- cgit v1.2.3 From 985a7a0a18f763ceae020cef2fbf0db3da17776d Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 31 Jan 2012 08:48:08 +0100 Subject: Adjusted tests to new parameters (see http://goo.gl/lXJBS) --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e854ac3..e979ff6 100644 --- a/README.md +++ b/README.md @@ -35,19 +35,19 @@ REST operations [feature_generation_uri], [prediction_algorithm], [feature_dataset_uri], - [propositionalized=false], [pc_type=null], - [nr_hits=false (class.), true (regr.)], - [min_sim=0.3 (nominal), 0.6 (numeric features)] + [nr_hits=false (class. using wt. maj. vote), true (else)], + [min_sim=0.3 (nominal), 0.4 (numeric features)] + [min_train_performance=0.1] Synopsis -------- -- prediction\_algorithm: One of "weighted\_majority\_vote" (default for classification), "local\_svm\_classification", "local\_svm\_regression (default for regression)", "local\_mlr\_prop". "weighted\_majority\_vote" is not applicable for regression. "local\_mlr\_prop" is not applicable for classification. -- propositionalized: One of "true", "false". Not appplicable when prediction\_algorithm="weighted\_majority\_vote". +- prediction\_algorithm: One of "weighted\_majority\_vote" (default for classification), "local\_svm\_classification", "local\_svm\_regression" (default for regression). "weighted\_majority\_vote" is not applicable for regression. - pc_type: Mandatory for feature dataset, one of [geometrical, topological, electronic, constitutional, hybrid, cpsa]. -- nr_hits: Whether for instantiated models (local\_svm\_kernel = "propositionalized" for prediction_algorithm="local\_svm\_classification" or "local\_svm\_regression", or for prediction_algorithm="local\_mlr\_prop") nominal features should be instantiated with their occurrence counts in the instances. For non-instantiated models (local\_svm\_kernel = "weighted\_tanimoto" for prediction_algorithm="local\_svm\_classification" or "local\_svm\_regression", or for prediction_algorithm="weighted\_majority\_vote") the neighbor-to-neighbor and neighbor-to-query similarity also integrates these counts, when the parameter is set. One of "true", "false". -- min_sim: The minimum similarity threshold for neighbors. Numeric value in [0,1]. +- nr_hits: Whether nominal features should be instantiated with their occurrence counts in the instances. One of "true", "false". +- min_sim: The minimum similarity threshold for neighbors. Numeric value in [0,1]. +- min_train_performance. The minimum training performance for "local\_svm\_classification" (Accuracy) and "local\_svm\_regression" (R-squared). Numeric value in [0,1]. See http://www.maunz.de/wordpress/opentox/2011/lazar-models-and-how-to-trigger-them for a graphical overview. -- cgit v1.2.3