diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-26 17:10:10 +0100 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-26 17:10:10 +0100 |
commit | 104a542e678aca8d4909633a48f1a4e7d93c659e (patch) | |
tree | 72599734d0662e3f4f1625b711eeb44630169276 /lib/ot_predictions.rb | |
parent | ab77945c4769b4a73336beb046e62221d5c620f8 (diff) |
adding redirect hack script/feature_uri->prediction_feature
Diffstat (limited to 'lib/ot_predictions.rb')
-rw-r--r-- | lib/ot_predictions.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ot_predictions.rb b/lib/ot_predictions.rb index d81bd29..6d9d7bc 100644 --- a/lib/ot_predictions.rb +++ b/lib/ot_predictions.rb @@ -79,7 +79,15 @@ module Lib predicted_values << class_values.index(value) confidence_values << prediction_dataset.get_prediction_confidence(c, predicted_variable) else - raise "TODO regression" + value = prediction_dataset.get_value(c, predicted_variable) + begin + value = value.to_f unless value==nil or value.is_a?(Numeric) + rescue + LOGGER.warn "no numeric value for regression: '"+value.to_s+"'" + value = nil + end + predicted_values << value + confidence_values << nil end end end |