Package

ai.bleckwen

xgboost

Permalink

package xgboost

Visibility
  1. Public
  2. All

Type Members

  1. final case class DecisionTree(root: Node) extends Product with Serializable

    Permalink

    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

  2. final case class DenseFVector(values: Array[Double], treatZeroAsNa: Boolean = true) extends FVector with Product with Serializable

    Permalink

    Dense Feature vector

    Dense Feature vector

    values

    features data

    treatZeroAsNa

    considers 0.0 as N/A

  3. trait FVector extends Serializable

    Permalink

    A generic Feature Vector

  4. final case class ModelParams(baseScore: Float, nbFeatures: Int, nbClass: Int, nbTrees: Int, nbGroups: Int, objName: String) extends Product with Serializable

    Permalink

    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

  5. abstract class Node extends Serializable

    Permalink

    A generic (binary) node of a decision Tree

  6. abstract class NodeFactory extends AnyRef

    Permalink
  7. final case class NodeImpl(left: Node, right: Node, id: Int, index: Int, defaultLeft: Boolean, value: Double, sumHess: Double, mean: Double = 0.0) extends Node with Product with Serializable

    Permalink

    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

  8. trait Objective extends Serializable

    Permalink

    The XGboost Objective functions

  9. abstract class PathElement extends AnyRef

    Permalink

    Element of a unique Path in SHAP algorithm https://arxiv.org/pdf/1802.03888.pdf

  10. final case class PathElementImpl(parent: PathElement, p0: Double, p1: Double, index: Int, depth: Double, weight: Double) extends PathElement with Product with Serializable

    Permalink
  11. case class Predictor(params: ModelParams, trees: Seq[DecisionTree], objective: Objective) extends Product with Serializable

    Permalink

    Predictor fox XGboost

    Predictor fox XGboost

    params

    model parameters

    trees

    decision tree

    objective

    objective function

    Annotations
    @SerialVersionUID()
  12. class PredictorBuilder extends AnyRef

    Permalink

    Builder to ease the creation of Predictor from Java (avoid using Scala Module name)

  13. final case class RawNode(id: Int, left: Int, right: Int, isLeaf: Boolean, value: Float, defaultLeft: Boolean, splitIndex: Int, sumHess: Float) extends Product with Serializable

    Permalink

    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

  14. final case class SparseFVector(values: Map[Int, Double]) extends FVector with Product with Serializable

    Permalink

    Sparse Feature vector

    Sparse Feature vector

    values

    a map of position/value

Value Members

  1. object DecisionTree extends Serializable

    Permalink
  2. object DenseFVector extends Serializable

    Permalink

    DenseFVector companion object is used to handle Java collections

  3. object ModelParams extends Serializable

    Permalink
  4. object NilNode extends Node with Product with Serializable

    Permalink
  5. object NilPath extends PathElement with Product with Serializable

    Permalink
  6. object NodeFactoryImpl extends NodeFactory with Product with Serializable

    Permalink
  7. object Objective extends Serializable

    Permalink
  8. object PathElement

    Permalink
  9. object Predictor extends Serializable

    Permalink
  10. object RawNode extends Serializable

    Permalink
  11. object RegLossObjLogistic extends Objective with Product with Serializable

    Permalink
  12. object SparseFVector extends Serializable

    Permalink

    SparseFVector companion object is used to handle Java collections

Ungrouped