ml.dmlc.xgboost4j.scala.spark

XGBoostClassificationModel

Related Doc: package spark

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)

  2. new XGBoostClassificationModel(booster: Booster)

Value Members

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

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

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

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

    Definition Classes
    AnyRef → Any
  5. var _booster: Booster

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

    Definition Classes
    Any
  7. def booster: Booster

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

    Definition Classes
    Params
  9. def clone(): AnyRef

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

    Definition Classes
    XGBoostClassificationModel → Model → Transformer → PipelineStage → Params
  11. def copyValues[T <: class="extype" name="org.apache.spark.ml.param.Params">Params](to: T, extra: ParamMap): T

    Attributes
    protected
    Definition Classes
    Params
  12. final def defaultCopy[T <: class="extype" name="org.apache.spark.ml.param.Params">Params](extra: ParamMap): T

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

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

    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

    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

    Definition Classes
    Params
  17. def explainParams(): String

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

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

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

    Definition Classes
    HasFeaturesCol
  21. def featuresDataType: DataType

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

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

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

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

    Definition Classes
    Params
  26. final def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  27. final def getLabelCol: String

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

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

    Definition Classes
    Params
  30. final def getPredictionCol: String

    Definition Classes
    HasPredictionCol
  31. final def getRawPredictionCol: String

  32. def getThresholds: Array[Double]

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

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

    Definition Classes
    Params
  35. def hasParent: Boolean

    Definition Classes
    Model
  36. def hashCode(): Int

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

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

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

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

    Definition Classes
    Params
  41. def isTraceEnabled(): Boolean

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

    Definition Classes
    HasLabelCol
  43. def log: Logger

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  50. def logName: String

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  58. def numClasses: Int

  59. def numFeatures: Int

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

    whether to output raw margin

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

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

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

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

    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]]]

    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]]]

    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]

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

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

    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

    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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  85. final val thresholds: DoubleArrayParam

    Thresholds in multi-class classification

  86. def toString(): String

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

    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

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

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

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

    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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def validateParams(): Unit

    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