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

- old
+ new

@@ -13,11 +13,11 @@ params[:num_class] = n_classes else params[:objective] ||= "binary" end - 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,