Class: XGBoost::TrainingCallback

Inherits:
Object
  • Object
show all
Defined in:
lib/xgboost/training_callback.rb

Direct Known Subclasses

EarlyStopping, EvaluationMonitor

Instance Method Summary collapse

Instance Method Details

#after_iteration(model, epoch, evals_log) ⇒ Object



18
19
20
21
# File 'lib/xgboost/training_callback.rb', line 18

def after_iteration(model, epoch, evals_log)
  # Run after each iteration. Returns true when training should stop.
  false
end

#after_training(model) ⇒ Object



8
9
10
11
# File 'lib/xgboost/training_callback.rb', line 8

def after_training(model)
  # Run after training is finished
  model
end

#before_iteration(model, epoch, evals_log) ⇒ Object



13
14
15
16
# File 'lib/xgboost/training_callback.rb', line 13

def before_iteration(model, epoch, evals_log)
  # Run before each iteration. Returns true when training should stop.
  false
end

#before_training(model) ⇒ Object



3
4
5
6
# File 'lib/xgboost/training_callback.rb', line 3

def before_training(model)
  # Run before training starts
  model
end