summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-01-13 14:02:58 +0100
committermguetlein <martin.guetlein@gmail.com>2011-01-13 14:02:58 +0100
commitf2ca545448ab8a6f654309f23cfce9416b2e9856 (patch)
treedb97da6b26689585ab2d51467ec72a6999e32cd8 /lib/algorithm.rb
parentc923250bccd4023447feb46935f3b59ce5cfb843 (diff)
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
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb14
1 files changed, 14 insertions, 0 deletions
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)