Class: Classified::Classifiers
- Inherits:
-
Object
- Object
- Classified::Classifiers
- Defined in:
- lib/classified.rb
Defined Under Namespace
Classes: InvalidClassifier
Constant Summary collapse
- VALID_CLASSIFIERS =
:classifier_lsi
[:classifier_bayes, :ankusa, :hoatzin]
Class Method Summary collapse
Class Method Details
.create(options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/classified.rb', line 16 def self.create = {} = { :classifier => :ankusa }.merge!() raise InvalidClassifier unless VALID_CLASSIFIERS.include?([:classifier]) case [:classifier] when :ankusa return Classified::Ankusa.new() when :hoatzin return Classified::Hoatzin.new() when :classifier_bayes return Classified::ClassifierBayes.new() when :classifier_lsi return Classified::ClassifierLSI.new() end end |