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 options = {}
options = { :classifier => :ankusa }.merge!(options)
raise InvalidClassifier unless VALID_CLASSIFIERS.include?(options[:classifier])
case options[:classifier]
when :ankusa
return Classified::Ankusa.new(options)
when :hoatzin
return Classified::Hoatzin.new(options)
when :classifier_bayes
return Classified::ClassifierBayes.new(options)
when :classifier_lsi
return Classified::ClassifierLSI.new(options)
end
end
|