Class: OpenTox::Feature
Instance Attribute Summary
Attributes included from OpenTox
Class Method Summary collapse
Instance Method Summary collapse
-
#domain ⇒ Array
provides domain (possible target values) of classification feature.
-
#feature_type ⇒ String
provides feature type, possible types are “regression” or “classification”.
Methods included from OpenTox
#add_metadata, all, #delete, #initialize, #load_metadata, login, text_to_html, #to_rdfxml
Class Method Details
.find(uri, subjectid = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/feature.rb', line 5 def self.find(uri, subjectid=nil) return nil unless uri feature = Feature.new uri if (CONFIG[:yaml_hosts].include?(URI.parse(uri).host)) feature. YAML.load(RestClientWrapper.get(uri,{:accept => "application/x-yaml", :subjectid => subjectid})) else feature. Parser::Owl::Dataset.new(uri). end feature end |
Instance Method Details
#domain ⇒ Array
provides domain (possible target values) of classification feature
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/feature.rb', line 18 def domain if [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 |