Method: LightGBM::Model#initialize

Defined in:
lib/lightgbm/model.rb

#initialize(num_leaves: 31, learning_rate: 0.1, n_estimators: 100, objective: nil, **options) ⇒ Model

Returns a new instance of Model.



5
6
7
8
9
10
11
12
# File 'lib/lightgbm/model.rb', line 5

def initialize(num_leaves: 31, learning_rate: 0.1, n_estimators: 100, objective: nil, **options)
  @params = {
    num_leaves: num_leaves,
    learning_rate: learning_rate
  }.merge(options)
  @params[:objective] = objective if objective
  @n_estimators = n_estimators
end