summaryrefslogtreecommitdiff
path: root/lib/validation_db.rb
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-01-07 09:35:17 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2010-01-07 09:35:17 +0100
commit15f49fc9862fa995612c7960becc2ce98f2bd1c4 (patch)
treeba90be782f56d9a8982409a6160199ab50c7226f /lib/validation_db.rb
parente4379c9757cc5376c63dffb8be94d0c427cef77a (diff)
* replace load with require (to avoid loading resources twice)
* adjust to new api * move validation constants from wrapper to lib in validation * accept header parsing in validation * rdf-support in validation
Diffstat (limited to 'lib/validation_db.rb')
-rw-r--r--lib/validation_db.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/validation_db.rb b/lib/validation_db.rb
index 3a74bfb..ee47365 100644
--- a/lib/validation_db.rb
+++ b/lib/validation_db.rb
@@ -5,6 +5,31 @@ end
module Lib
+
+ VAL_PROPS = [ :id, :uri, :model_uri, :training_dataset_uri, :prediction_feature,
+ :test_dataset_uri, :prediction_dataset_uri, :finished,
+ :created_at, :real_runtime, # :cpu_runtime,
+ :num_instances, :num_without_class, :percent_without_class, :num_unpredicted, :percent_unpredicted ]
+
+ # :crossvalidation_info
+ VAL_CV_PROPS = [ :crossvalidation_id, :crossvalidation_fold ]
+
+ # :classification_statistics
+ VAL_CLASS_PROPS_SINGLE = [ :num_correct, :num_incorrect, :percent_correct, :percent_incorrect ]
+ # :class_value_statistics
+ VAL_CLASS_PROPS_PER_CLASS = [ :area_under_roc, :false_negative_rate, :false_positive_rate,
+ :f_measure, :num_false_positives, :num_false_negatives,
+ :num_true_positives, :num_true_negatives, :precision,
+ :recall, :true_negative_rate, :true_positive_rate ]
+ VAL_CLASS_PROPS = VAL_CLASS_PROPS_SINGLE + VAL_CLASS_PROPS_PER_CLASS + [ :confusion_matrix ]
+
+ # :regression_statistics
+ VAL_REGR_PROPS = [ :root_mean_squared_error, :mean_absolute_error, :r_square ]
+
+ CROSS_VAL_PROPS = [:algorithm_uri, :dataset_uri, :num_folds, :stratified, :random_seed]
+
+ ALL_PROPS = VAL_PROPS + VAL_CV_PROPS + VAL_CLASS_PROPS + VAL_REGR_PROPS + CROSS_VAL_PROPS
+
class Validation
include DataMapper::Resource