XGBCallback

public protocol XGBCallback

protocol for Callback sent to training / cross validation function. Custom callback need to implement the callback() method that has 1 parameter in type of CallbackEnv. A implementation of callback should also have a property beforeIteration to specify whether the callback should be executed before a iteration.

  • To specify is the callback should be called before an iteration

    Declaration

    Swift

    var beforeIteration: Bool { get }
  • The function to be called

    Declaration

    Swift

    func callback(env: CallbackEnv) throws