summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-14 17:48:26 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-14 17:48:26 +0100
commitd4eb231a35c23a5fdb36fd6220b5ab706e7528ba (patch)
treeb707e43fd0fc17bf1b7eb6aa9430c694b7f457a3 /lib/feature.rb
parent7dd4c74bf118285d567b0b221d091511b6a77b2f (diff)
read from subjectcookie, fix read feature_type
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index be063dd..c0729a7 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -16,8 +16,14 @@ module OpenTox
# provides domain (possible target values) of classification feature
# @return [Array] list with possible target values
def domain
- #TODO derieve from metadata / ontology
- return [true, false]
+ if metadata[OT.acceptValue]
+ raise "accept value found, remove hack and implement correctly"
+ else
+ if @uri=~/feature\/26221/ || @uri=~/feature\/221726/
+ return ["mutagen" , "nonmutagen"]
+ end
+ return [true, false]
+ end
end
# provides feature type, possible types are "regression" or "classification"