package xgboost
- Alphabetic
- Public
- All
Type Members
-
final
case class
DecisionTree(root: Node) extends Product with Serializable
An XGboost Decision Tree Note that algorithms are independent of Nodes implementation as Node is abstract
An XGboost Decision Tree Note that algorithms are independent of Nodes implementation as Node is abstract
- root
root node
-
final
case class
DenseFVector(values: Array[Double], treatZeroAsNa: Boolean = true) extends FVector with Product with Serializable
Dense Feature vector
Dense Feature vector
- values
features data
- treatZeroAsNa
considers 0.0 as N/A
-
trait
FVector extends Serializable
A generic Feature Vector
-
final
case class
ModelParams(baseScore: Float, nbFeatures: Int, nbClass: Int, nbTrees: Int, nbGroups: Int, objName: String) extends Product with Serializable
the model Parameters
the model Parameters
- baseScore
base score
- nbFeatures
number of features
- nbClass
number of classes
- nbTrees
number of trees
- nbGroups
numbet of groups
- objName
objective name
-
abstract
class
Node extends Serializable
A generic (binary) node of a decision Tree
- abstract class NodeFactory extends AnyRef
-
final
case class
NodeImpl(left: Node, right: Node, id: Int, index: Int, defaultLeft: Boolean, value: Float, sumHess: Double, mean: Double = 0.0) extends Node with Product with Serializable
The node implementation (actually a simple case class)
The node implementation (actually a simple case class)
- left
left child
- right
right child
- id
rw node id (just used for information)
- index
split index
- defaultLeft
is left child the default
- value
node value
- sumHess
sum hess
- mean
mean value
-
trait
Objective extends Serializable
The XGboost Objective functions
-
abstract
class
PathElement extends AnyRef
Element of a unique Path in SHAP algorithm https://arxiv.org/pdf/1802.03888.pdf
- final case class PathElementImpl(parent: PathElement, p0: Double, p1: Double, index: Int, depth: Double, weight: Double) extends PathElement with Product with Serializable
-
case class
Predictor(params: ModelParams, trees: Seq[DecisionTree], objective: Objective) extends Product with Serializable
Predictor fox XGboost
Predictor fox XGboost
- params
model parameters
- trees
decision tree
- objective
objective function
- Annotations
- @SerialVersionUID()
-
class
PredictorBuilder extends AnyRef
Builder to ease the creation of Predictor from Java (avoid using Scala Module name)
-
final
case class
RawNode(id: Int, left: Int, right: Int, isLeaf: Boolean, value: Float, defaultLeft: Boolean, splitIndex: Int, sumHess: Float) extends Product with Serializable
RawNode is just use to read the trees from binary model file
RawNode is just use to read the trees from binary model file
- id
node id
- left
left node id
- right
right node id
- isLeaf
is this a leaf node
- value
leaf value or split value
- defaultLeft
is left child the default
- splitIndex
split index
- sumHess
sum Hess
-
final
case class
SparseFVector(values: Map[Int, Double]) extends FVector with Product with Serializable
Sparse Feature vector
Sparse Feature vector
- values
a map of position/value
Value Members
- object DecisionTree extends Serializable
-
object
DenseFVector extends Serializable
DenseFVector companion object is used to handle Java collections
- object ModelParams extends Serializable
- object NilNode extends Node with Product with Serializable
- object NilPath extends PathElement with Product with Serializable
- object NodeFactoryImpl extends NodeFactory with Product with Serializable
- object Objective extends Serializable
- object PathElement
- object Predictor extends Serializable
- object RawNode extends Serializable
- object RegLossObjLogistic extends Objective with Product with Serializable
-
object
SparseFVector extends Serializable
SparseFVector companion object is used to handle Java collections