Sha256: 7829c65baa20070012e89ef4d2cb4de5a36e76bb9ae27d7c891137ca50a5c3e9
Contents?: true
Size: 689 Bytes
Versions: 19
Compression:
Stored size: 689 Bytes
Contents
module LightGBM class Ranker < Model def initialize(num_leaves: 31, learning_rate: 0.1, n_estimators: 100, objective: "lambdarank", **options) super end def fit(x, y, group:, categorical_feature: "auto", early_stopping_rounds: nil, verbose: true) train_set = Dataset.new(x, label: y, group: group, categorical_feature: categorical_feature) @booster = LightGBM.train(@params, train_set, num_boost_round: @n_estimators, early_stopping_rounds: early_stopping_rounds, verbose_eval: verbose ) nil end def predict(data, num_iteration: nil) @booster.predict(data, num_iteration: num_iteration) end end end
Version data entries
19 entries across 19 versions & 1 rubygems