diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 10:57:32 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 10:57:32 +0200 |
commit | 8b8d7bc91ee841461620269f5892da72a0b114f6 (patch) | |
tree | 030dde5e95f8f7b7eb12ffb5582148bd16e672d2 /validation | |
parent | f694a575013fef53ef27a1e4415c4039531fbfbe (diff) |
use accept_values method instead of accessing metadata directly
Diffstat (limited to 'validation')
-rwxr-xr-x | validation/validation_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/validation/validation_service.rb b/validation/validation_service.rb index e16e45d..6954a33 100755 --- a/validation/validation_service.rb +++ b/validation/validation_service.rb @@ -392,7 +392,9 @@ module Validation split_compounds = shuffled_compounds.chunk( self.num_folds.to_i ) else class_compounds = {} # "inactive" => compounds[], "active" => compounds[] .. - accept_values = orig_dataset.features[prediction_feature][OT.acceptValue] + accept_values = orig_dataset.accept_values(prediction_feature) + raise BadRequestError.new("cannot apply stratification (not implemented for regression), acceptValue missing for prediction-feature '"+ + prediction_feature.to_s+"' in dataset '"+dataset_uri.to_s+"'") unless accept_values and accept_values.size>0 accept_values.each do |value| class_compounds[value] = [] shuffled_compounds.each do |c| |