ml.dmlc.xgboost4j.scala.spark

XGBoostModel

Related Doc: package spark

abstract class XGBoostModel extends PredictionModel[Vector, XGBoostModel] with Serializable with Params

the base class of XGBoostClassificationModel and XGBoostRegressionModel

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

Instance Constructors

  1. new XGBoostModel(_booster: Booster)

Abstract Value Members

  1. abstract def copy(extra: ParamMap): XGBoostModel

    Definition Classes
    Model → Transformer → PipelineStage → Params
  2. abstract def predict(features: Vector): Double

    Attributes
    protected
    Definition Classes
    PredictionModel
  3. abstract val uid: String

    Definition Classes
    Identifiable

Concrete 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
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def booster: Booster

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

    Definition Classes
    Params
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def copyValues[T <: class="extype" name="org.apache.spark.ml.param.Params">Params](to: T, extra: ParamMap): T

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

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

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

    Definition Classes
    AnyRef → Any
  14. 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

  15. def explainParam(param: Param[_]): String

    Definition Classes
    Params
  16. def explainParams(): String

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

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

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

    Definition Classes
    HasFeaturesCol
  20. def featuresDataType: DataType

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

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

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

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

    Definition Classes
    Params
  25. final def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  26. final def getLabelCol: String

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

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

    Definition Classes
    Params
  29. final def getPredictionCol: String

    Definition Classes
    HasPredictionCol
  30. final def hasDefault[T](param: Param[T]): Boolean

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

    Definition Classes
    Params
  32. def hasParent: Boolean

    Definition Classes
    Model
  33. def hashCode(): Int

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

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

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

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

    Definition Classes
    Params
  38. def isTraceEnabled(): Boolean

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

    Definition Classes
    HasLabelCol
  40. def log: Logger

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  47. def logName: String

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  55. def numFeatures: Int

    Definition Classes
    PredictionModel
    Annotations
    @Since( "1.6.0" )
  56. lazy val params: Array[Param[_]]

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

    Definition Classes
    Model
  58. 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

  59. 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

  60. 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

  61. final val predictionCol: Param[String]

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

    Attributes
    protected
  63. 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.

  64. final def set(paramPair: ParamPair[_]): XGBoostModel.this.type

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

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

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

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

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

  70. def setFeaturesCol(value: String): XGBoostModel

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

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

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

    Definition Classes
    PredictionModel
  74. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  75. def toString(): String

    Definition Classes
    Identifiable → AnyRef → Any
  76. 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
  77. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame

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

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

    Attributes
    protected
    Definition Classes
    PredictionModel
  80. 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

  81. def transformSchema(schema: StructType): StructType

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

    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  83. final val useExternalMemory: Param[Boolean]

  84. def validateAndTransformSchema(schema: StructType, fitting: Boolean, featuresDataType: DataType): StructType

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  87. 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 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