Class: Eps::PMML::Generator
- Inherits:
-
Object
- Object
- Eps::PMML::Generator
- Defined in:
- lib/eps/pmml/generator.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(model) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(model) ⇒ Generator
Returns a new instance of Generator.
6 7 8 |
# File 'lib/eps/pmml/generator.rb', line 6 def initialize(model) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'lib/eps/pmml/generator.rb', line 4 def model @model end |
Instance Method Details
#generate ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/eps/pmml/generator.rb', line 10 def generate case @model when LightGBM lightgbm when LinearRegression linear_regression when NaiveBayes naive_bayes else raise "Unknown model" end end |