From f2ca545448ab8a6f654309f23cfce9416b2e9856 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Thu, 13 Jan 2011 14:02:58 +0100 Subject: find methods for algorithm and model, split method for dataset, feature_type method for model and feature, perform single predicitons in resuce block, add to-html.rb, fix handling of rest-client-wrapper --- lib/algorithm.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/algorithm.rb') diff --git a/lib/algorithm.rb b/lib/algorithm.rb index a2f7786..0aa86e6 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -29,6 +29,20 @@ module OpenTox # Generic Algorithm class, should work with all OpenTox webservices class Generic include Algorithm + + # Find Generic Opentox Algorithm via URI, and loads metadata + # @param [String] uri Algorithm URI + # @return [OpenTox::Algorithm::Generic] Algorithm instance, nil if alogrithm was not found + def self.find(uri) + alg = Generic.new(uri) + alg.load_metadata + if alg.metadata==nil or alg.metadata.size==0 + nil + else + alg + end + end + end # Fminer algorithms (https://github.com/amaunz/fminer2) -- cgit v1.2.3