lib/lightgbm/regressor.rb in lightgbm-0.1.4 vs lib/lightgbm/regressor.rb in lightgbm-0.1.5

- old
+ new

@@ -3,11 +3,11 @@ def initialize(num_leaves: 31, learning_rate: 0.1, n_estimators: 100, objective: "regression", **options) super end def fit(x, y, categorical_feature: "auto", eval_set: nil, eval_names: [], early_stopping_rounds: nil, verbose: true) - train_set = Dataset.new(x, label: y, categorical_feature: categorical_feature) - valid_sets = Array(eval_set).map { |v| Dataset.new(v[0], label: v[1], reference: train_set) } + train_set = Dataset.new(x, label: y, categorical_feature: categorical_feature, params: @params) + valid_sets = Array(eval_set).map { |v| Dataset.new(v[0], label: v[1], reference: train_set, params: @params) } @booster = LightGBM.train(@params, train_set, num_boost_round: @n_estimators, early_stopping_rounds: early_stopping_rounds, verbose_eval: verbose,