Class

ml.dmlc.xgboost4j.scala.spark

XGBoostClassificationModel

Related Doc: package spark

Permalink

class XGBoostClassificationModel extends XGBoostModel

class of the XGBoost model used for classification task

Linear Supertypes
XGBoostModel, PredictionModel[Vector, XGBoostModel], PredictorParams, HasPredictionCol, HasFeaturesCol, HasLabelCol, Model[XGBoostModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XGBoostClassificationModel
  2. XGBoostModel
  3. PredictionModel
  4. PredictorParams
  5. HasPredictionCol
  6. HasFeaturesCol
  7. HasLabelCol
  8. Model
  9. Transformer
  10. PipelineStage
  11. Logging
  12. Params
  13. Serializable
  14. Serializable
  15. Identifiable
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new XGBoostClassificationModel(uid: String)

    Permalink
  2. new XGBoostClassificationModel(booster: Booster)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. var _booster: Booster

    Permalink
    Attributes
    protected
    Definition Classes
    XGBoostModel
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def booster: Booster

    Permalink
    Definition Classes
    XGBoostModel
  8. final def clear(param: Param[_]): XGBoostClassificationModel.this.type

    Permalink
    Definition Classes
    Params
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def copy(extra: ParamMap): XGBoostClassificationModel

    Permalink
    Definition Classes
    XGBoostClassificationModel → Model → Transformer → PipelineStage → Params
  11. def copyValues[T <: Params](to: T, extra: ParamMap): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  12. final def defaultCopy[T <: Params](extra: ParamMap): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def eval(evalDataset: RDD[org.apache.spark.ml.feature.LabeledPoint], evalName: String, evalFunc: EvalTrait = null, iter: Int = 1, useExternalCache: Boolean = false): String

    Permalink

    evaluate XGBoostModel with a RDD-wrapped dataset

    evaluate XGBoostModel with a RDD-wrapped dataset

    NOTE: you have to specify value of either eval or iter; when you specify both, this method adopts the default eval metric of model

    evalDataset

    the dataset used for evaluation

    evalName

    the name of evaluation

    evalFunc

    the customized evaluation function, null by default to use the default metric of model

    iter

    the current iteration, -1 to be null to use customized evaluation functions

    returns

    the average metric over all partitions

    Definition Classes
    XGBoostModel
  16. def explainParam(param: Param[_]): String

    Permalink
    Definition Classes
    Params
  17. def explainParams(): String

    Permalink
    Definition Classes
    Params
  18. final def extractParamMap(): ParamMap

    Permalink
    Definition Classes
    Params
  19. final def extractParamMap(extra: ParamMap): ParamMap

    Permalink
    Definition Classes
    Params
  20. final val featuresCol: Param[String]

    Permalink
    Definition Classes
    HasFeaturesCol
  21. def featuresDataType: DataType

    Permalink
    Attributes
    protected
    Definition Classes
    PredictionModel
  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def get[T](param: Param[T]): Option[T]

    Permalink
    Definition Classes
    Params
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def getDefault[T](param: Param[T]): Option[T]

    Permalink
    Definition Classes
    Params
  26. final def getFeaturesCol: String

    Permalink
    Definition Classes
    HasFeaturesCol
  27. final def getLabelCol: String

    Permalink
    Definition Classes
    HasLabelCol
  28. final def getOrDefault[T](param: Param[T]): T

    Permalink
    Definition Classes
    Params
  29. def getParam(paramName: String): Param[Any]

    Permalink
    Definition Classes
    Params
  30. final def getPredictionCol: String

    Permalink
    Definition Classes
    HasPredictionCol
  31. final def getRawPredictionCol: String

    Permalink
  32. def getThresholds: Array[Double]

    Permalink
  33. final def hasDefault[T](param: Param[T]): Boolean

    Permalink
    Definition Classes
    Params
  34. def hasParam(paramName: String): Boolean

    Permalink
    Definition Classes
    Params
  35. def hasParent: Boolean

    Permalink
    Definition Classes
    Model
  36. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  37. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  38. final def isDefined(param: Param[_]): Boolean

    Permalink
    Definition Classes
    Params
  39. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  40. final def isSet(param: Param[_]): Boolean

    Permalink
    Definition Classes
    Params
  41. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  42. final val labelCol: Param[String]

    Permalink
    Definition Classes
    HasLabelCol
  43. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  44. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  45. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  46. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  47. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  48. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  49. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  50. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  51. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  52. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  53. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  54. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  58. def numClasses: Int

    Permalink
  59. def numFeatures: Int

    Permalink
    Definition Classes
    PredictionModel
    Annotations
    @Since( "1.6.0" )
  60. final val outputMargin: Param[Boolean]

    Permalink

    whether to output raw margin

  61. lazy val params: Array[Param[_]]

    Permalink
    Definition Classes
    Params
  62. var parent: Estimator[XGBoostModel]

    Permalink
    Definition Classes
    Model
  63. def predict(features: Vector): Double

    Permalink
    Attributes
    protected
    Definition Classes
    XGBoostClassificationModel → PredictionModel
  64. def predict(testSet: RDD[Vector], useExternalCache: Boolean = false): RDD[Array[Array[Float]]]

    Permalink

    Predict result with the given test set (represented as RDD)

    Predict result with the given test set (represented as RDD)

    testSet

    test set represented as RDD

    useExternalCache

    whether to use external cache for the test set

    Definition Classes
    XGBoostModel
  65. def predict(testSet: RDD[DenseVector], missingValue: Float): RDD[Array[Array[Float]]]

    Permalink

    Predict result with the given test set (represented as RDD)

    Predict result with the given test set (represented as RDD)

    testSet

    test set represented as RDD

    missingValue

    the specified value to represent the missing value

    Definition Classes
    XGBoostModel
  66. def predictLeaves(testSet: RDD[Vector]): RDD[Array[Array[Float]]]

    Permalink

    Predict leaf instances with the given test set (represented as RDD)

    Predict leaf instances with the given test set (represented as RDD)

    testSet

    test set represented as RDD

    Definition Classes
    XGBoostModel
  67. final val predictionCol: Param[String]

    Permalink
    Definition Classes
    HasPredictionCol
  68. def produceRowRDD(testSet: Dataset[_], outputMargin: Boolean = false, predLeaf: Boolean = false): RDD[Row]

    Permalink
    Attributes
    protected
    Definition Classes
    XGBoostModel
  69. final val rawPredictionCol: Param[String]

    Permalink

    the name of the column storing the raw prediction value, either probabilities (as default) or raw margin value

  70. def saveModelAsHadoopFile(modelPath: String)(implicit sc: SparkContext): Unit

    Permalink

    Save the model as to HDFS-compatible file system.

    Save the model as to HDFS-compatible file system.

    modelPath

    The model path as in Hadoop path.

    Definition Classes
    XGBoostModel
  71. final def set(paramPair: ParamPair[_]): XGBoostClassificationModel.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  72. final def set(param: String, value: Any): XGBoostClassificationModel.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  73. final def set[T](param: Param[T], value: T): XGBoostClassificationModel.this.type

    Permalink
    Definition Classes
    Params
  74. final def setDefault(paramPairs: ParamPair[_]*): XGBoostClassificationModel.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  75. final def setDefault[T](param: Param[T], value: T): XGBoostClassificationModel.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  76. def setExternalMemory(value: Boolean): XGBoostModel

    Permalink
    Definition Classes
    XGBoostModel
  77. def setFeaturesCol(value: String): XGBoostModel

    Permalink
    Definition Classes
    PredictionModel
  78. def setLabelCol(name: String): XGBoostModel

    Permalink
    Definition Classes
    XGBoostModel
  79. def setOutputMargin(value: Boolean): XGBoostModel

    Permalink
  80. def setParent(parent: Estimator[XGBoostModel]): XGBoostModel

    Permalink
    Definition Classes
    Model
  81. def setPredictionCol(value: String): XGBoostModel

    Permalink
    Definition Classes
    PredictionModel
  82. def setRawPredictionCol(value: String): XGBoostClassificationModel

    Permalink
  83. def setThresholds(value: Array[Double]): XGBoostClassificationModel

    Permalink
  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  85. final val thresholds: DoubleArrayParam

    Permalink

    Thresholds in multi-class classification

  86. def toString(): String

    Permalink
    Definition Classes
    Identifiable → AnyRef → Any
  87. def transform(testSet: Dataset[_]): DataFrame

    Permalink

    produces the prediction results and append as an additional column in the original dataset NOTE: the prediction results is kept as the original format of xgboost

    produces the prediction results and append as an additional column in the original dataset NOTE: the prediction results is kept as the original format of xgboost

    returns

    the original dataframe with an additional column containing prediction results

    Definition Classes
    XGBoostModel → PredictionModel → Transformer
  88. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame

    Permalink
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  89. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame

    Permalink
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  90. def transformImpl(testSet: Dataset[_]): DataFrame

    Permalink
    Attributes
    protected
    Definition Classes
    XGBoostClassificationModel → XGBoostModel → PredictionModel
  91. def transformLeaf(testSet: Dataset[_]): DataFrame

    Permalink

    append leaf index of each row as an additional column in the original dataset

    append leaf index of each row as an additional column in the original dataset

    returns

    the original dataframe with an additional column containing prediction results

    Definition Classes
    XGBoostModel
  92. def transformSchema(schema: StructType): StructType

    Permalink
    Definition Classes
    PredictionModel → PipelineStage
  93. def transformSchema(schema: StructType, logging: Boolean): StructType

    Permalink
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  94. val uid: String

    Permalink
    Definition Classes
    XGBoostClassificationModel → Identifiable
  95. final val useExternalMemory: Param[Boolean]

    Permalink
    Definition Classes
    XGBoostModel
  96. def validateAndTransformSchema(schema: StructType, fitting: Boolean, featuresDataType: DataType): StructType

    Permalink
    Attributes
    protected
    Definition Classes
    PredictorParams
  97. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def validateParams(): Unit

    Permalink
    Definition Classes
    Params
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) Will be removed in 2.1.0. Checks should be merged into transformSchema.

Inherited from XGBoostModel

Inherited from PredictionModel[Vector, XGBoostModel]

Inherited from PredictorParams

Inherited from HasPredictionCol

Inherited from HasFeaturesCol

Inherited from HasLabelCol

Inherited from Model[XGBoostModel]

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Ungrouped