lib/xgboost.rb in xgb-0.3.0 vs lib/xgboost.rb in xgb-0.3.1

- old
+ new

@@ -29,10 +29,11 @@ class << self def train(params, dtrain, num_boost_round: 10, evals: nil, early_stopping_rounds: nil, verbose_eval: true) booster = Booster.new(params: params) num_feature = dtrain.num_col booster.set_param("num_feature", num_feature) - booster.feature_names = num_feature.times.map { |i| "f#{i}" } + booster.feature_names = dtrain.feature_names + booster.feature_types = dtrain.feature_types evals ||= [] if early_stopping_rounds best_score = nil best_iter = nil