lib/xgb.rb in xgb-0.1.1 vs lib/xgb.rb in xgb-0.1.2
- old
+ new
@@ -3,18 +3,27 @@
# modules
require "xgb/utils"
require "xgb/booster"
require "xgb/dmatrix"
-require "xgb/ffi"
require "xgb/version"
# scikit-learn API
+require "xgb/model"
require "xgb/classifier"
+require "xgb/ranker"
require "xgb/regressor"
module Xgb
class Error < StandardError; end
+
+ class << self
+ attr_accessor :ffi_lib
+ end
+ self.ffi_lib = ["xgboost"]
+
+ # friendlier error message
+ autoload :FFI,"xgb/ffi"
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