Class/Object

ai.catboost.spark

CatBoostRegressionModel

Related Docs: object CatBoostRegressionModel | package spark

Permalink

class CatBoostRegressionModel extends RegressionModel[Vector, CatBoostRegressionModel] with CatBoostModelTrait[CatBoostRegressionModel]

Regression model trained by CatBoost. Use CatBoostRegressor to train it

Serialization

Supports standard Spark MLLib serialization. Data can be saved to distributed filesystem like HDFS or local files. When saved to path two files are created: -<path>/metadata which contains Spark-specific metadata in JSON format -<path>/model which contains model in usual CatBoost format which can be read using other local CatBoost APIs (if stored in a distributed filesystem it has to be copied to the local filesystem first).

Examples:
  1. Load model

    val dataFrameForPrediction : DataFrame = ... init DataFrame ...
    val path = "/home/user/catboost_spark_models/model0"
    val model = CatBoostRegressionModel.load(path)
    val predictions = model.transform(dataFrameForPrediction)
    predictions.show()
  2. ,
  3. Save model

    val trainPool : Pool = ... init Pool ...
    val regressor = new CatBoostRegressor
    val model = regressor.fit(trainPool)
    val path = "/home/user/catboost_spark_models/model0"
    model.write.save(path)
Linear Supertypes
CatBoostModelTrait[CatBoostRegressionModel], MLWritable, RegressionModel[Vector, CatBoostRegressionModel], PredictionModel[Vector, CatBoostRegressionModel], PredictorParams, HasPredictionCol, HasFeaturesCol, HasLabelCol, Model[CatBoostRegressionModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CatBoostRegressionModel
  2. CatBoostModelTrait
  3. MLWritable
  4. RegressionModel
  5. PredictionModel
  6. PredictorParams
  7. HasPredictionCol
  8. HasFeaturesCol
  9. HasLabelCol
  10. Model
  11. Transformer
  12. PipelineStage
  13. Logging
  14. Params
  15. Serializable
  16. Serializable
  17. Identifiable
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CatBoostRegressionModel(nativeModel: TFullModel)

    Permalink
  2. new CatBoostRegressionModel(uid: String, nativeModel: TFullModel = null, nativeDimension: Int)

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

    Permalink
    Definition Classes
    Any
  6. final def clear(param: Param[_]): CatBoostRegressionModel.this.type

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def explainParam(param: Param[_]): String

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

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

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

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

    Permalink
    Definition Classes
    HasFeaturesCol
  18. def featuresDataType: DataType

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

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

    Permalink
    Definition Classes
    Params
  21. def getAdditionalColumnsForApply: Seq[StructField]

    Permalink
    Attributes
    protected
    Definition Classes
    CatBoostRegressionModel → CatBoostModelTrait
  22. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    Params
  24. final def getFeaturesCol: String

    Permalink
    Definition Classes
    HasFeaturesCol
  25. final def getLabelCol: String

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

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

    Permalink
    Definition Classes
    Params
  28. final def getPredictionCol: String

    Permalink
    Definition Classes
    HasPredictionCol
  29. def getResultIteratorForApply(rawObjectsDataProvider: SWIGTYPE_p_NCB__TRawObjectsDataProviderPtr, dstRows: ArrayBuffer[Array[Any]], threadCountForTask: Int): Iterator[Row]

    Permalink
    Attributes
    protected
    Definition Classes
    CatBoostRegressionModel → CatBoostModelTrait
  30. final def hasDefault[T](param: Param[T]): Boolean

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

    Permalink
    Definition Classes
    Params
  32. def hasParent: Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  34. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  35. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

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

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

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

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

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

    Permalink
    Definition Classes
    HasLabelCol
  41. def log: Logger

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  53. var nativeDimension: Int

    Permalink
    Attributes
    protected
    Definition Classes
    CatBoostRegressionModel → CatBoostModelTrait
  54. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  57. def numFeatures: Int

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

    Permalink
    Definition Classes
    Params
  59. var parent: Estimator[CatBoostRegressionModel]

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

    Permalink

    Prefer batch computations operating on datasets as a whole for efficiency

    Prefer batch computations operating on datasets as a whole for efficiency

    Definition Classes
    CatBoostRegressionModel → PredictionModel
  61. final def predictRawImpl(features: Vector): Array[Double]

    Permalink

    Prefer batch computations operating on datasets as a whole for efficiency

    Prefer batch computations operating on datasets as a whole for efficiency

    Definition Classes
    CatBoostModelTrait
  62. final val predictionCol: Param[String]

    Permalink
    Definition Classes
    HasPredictionCol
  63. def save(path: String): Unit

    Permalink
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  64. final def set(paramPair: ParamPair[_]): CatBoostRegressionModel.this.type

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  69. def setFeaturesCol(value: String): CatBoostRegressionModel

    Permalink
    Definition Classes
    PredictionModel
  70. def setParent(parent: Estimator[CatBoostRegressionModel]): CatBoostRegressionModel

    Permalink
    Definition Classes
    Model
  71. def setPredictionCol(value: String): CatBoostRegressionModel

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

    Permalink
    Definition Classes
    AnyRef
  73. def toString(): String

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

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

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

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

    Permalink
    Definition Classes
    CatBoostModelTrait → PredictionModel
  78. def transformSchema(schema: StructType): StructType

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

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

    Permalink
    Definition Classes
    CatBoostRegressionModel → Identifiable
  81. def validateAndTransformSchema(schema: StructType, fitting: Boolean, featuresDataType: DataType): StructType

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  85. def write: MLWriter

    Permalink
    Definition Classes
    CatBoostModelTrait → MLWritable

Inherited from CatBoostModelTrait[CatBoostRegressionModel]

Inherited from MLWritable

Inherited from RegressionModel[Vector, CatBoostRegressionModel]

Inherited from PredictionModel[Vector, CatBoostRegressionModel]

Inherited from PredictorParams

Inherited from HasPredictionCol

Inherited from HasFeaturesCol

Inherited from HasLabelCol

Inherited from Model[CatBoostRegressionModel]

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