summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-06-21 16:12:18 +0200
committerAndreas Maunz <andreas@maunz.de>2011-06-21 16:12:18 +0200
commit1222ff3e76051cd4903bfe89a3b3d8c0a7222799 (patch)
tree862fa1e9b84ab86cbf2c93d086aab60316c8f2b1
parentcec978fb5cf0defcb79dd8e0da604c4f6c978674 (diff)
Fixing map values to not start from 0
-rw-r--r--lazar.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lazar.rb b/lazar.rb
index 6f8f439..d692422 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -66,7 +66,7 @@ post '/lazar/?' do
if prediction_feature.feature_type == "classification"
@training_classes = training_activities.accept_values(prediction_feature.uri).sort
@training_classes.each_with_index { |c,i|
- lazar.value_map[i] = c
+ lazar.value_map[i+1] = c # don't use '0': we must take the weighted mean later.
params[:value_map] = lazar.value_map
}
elsif prediction_feature.feature_type == "regression"