Type Aliases
The following type aliases are available globally.
-
A pair of parameter name and value to be set for xgboost.
Declaration
Swift
public typealias Param = (name: String, value: String)
-
Evaluation result, with the name of the measure, mean value and option standard deviation
Declaration
Swift
public typealias EvalResult = [(String, Float, Float?)]
-
Function signature for customized evaluation. The first parameter is the predicted values, the second parameter is the DMatrix of training data that contains label. It returns the name of the evaluation function and the value of the evaluation. The returned name should not contain colon “:”
Declaration
Swift
public typealias FuncEval = ([Float], DMatrix) -> (name: String, eval: Float)
-
Function signature for customized objective function. The first parameter is the predicted values, the second parameter is the DMatrix of training data that contains label. It returns gradient and second order gradient.
Declaration
Swift
public typealias FuncObj = ([Float], DMatrix) -> (grad: [Float], hess: [Float])
-
Each k, v pair is a measure’s mean or std of each round
Declaration
Swift
public typealias CVResult = [String : [Float]]