org.apache.spark.ml

DLModel

class DLModel[T] extends DLTransformerBase[DLModel[T]] with DLParams[T] with HasBatchSize

DLModel helps embed a BigDL model into a Spark Transformer, thus Spark users can conveniently merge BigDL into Spark ML pipeline. DLModel supports feature data in the format of Array[Double], Array[Float], org.apache.spark.mllib.linalg.{Vector, VectorUDT}, org.apache.spark.ml.linalg.{Vector, VectorUDT}, Double and Float. Internally DLModel use features column as storage of the feature data, and create Tensors according to the constructor parameter featureSize.

DLModel is compatible with both spark 1.5-plus and 2.0 by extending ML Transformer.

Linear Supertypes
DLParams[T], HasBatchSize, VectorCompatibility, HasPredictionCol, HasFeaturesCol, DLTransformerBase[DLModel[T]], Model[DLModel[T]], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DLModel
  2. DLParams
  3. HasBatchSize
  4. VectorCompatibility
  5. HasPredictionCol
  6. HasFeaturesCol
  7. DLTransformerBase
  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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DLModel(model: Module[T], featureSize: Array[Int], uid: String = "DLModel")(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    model

    trainned BigDL models to use in prediction.

    featureSize

    The size (Tensor dimensions) of the feature data. (e.g. an image may be with featureSize = 28 * 28).

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Attributes
    protected
    Definition Classes
    Params
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. final val batchSize: Param[Int]

    Definition Classes
    HasBatchSize
  9. final def clear(param: Param[_]): DLModel.this.type

    Attributes
    protected
    Definition Classes
    Params
  10. def clone(): AnyRef

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

    Definition Classes
    DLModel → DLTransformerBase → Model → Transformer → PipelineStage → Params
  12. def copyValues[T <: Params](to: T, extra: ParamMap): T

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

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

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

    Definition Classes
    AnyRef → Any
  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. var featureSize: Array[Int]

    The size (Tensor dimensions) of the feature data.

    The size (Tensor dimensions) of the feature data. (e.g. an image may be with featureSize = 28 * 28).

  21. final val featuresCol: Param[String]

    Definition Classes
    HasFeaturesCol
  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. def getBatchSize: Int

    Definition Classes
    HasBatchSize
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def getConvertFunc(colType: DataType): (Row, Int) ⇒ Seq[AnyVal]

    Get conversion function to extract data from original DataFrame Default: 0

    Get conversion function to extract data from original DataFrame Default: 0

    Attributes
    protected
    Definition Classes
    DLParams
  27. final def getDefault[T](param: Param[T]): Option[T]

    Definition Classes
    Params
  28. def getFeatureSize: Array[Int]

  29. final def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  30. def getLearningRate: Double

    Definition Classes
    DLParams
  31. def getLearningRateDecay: Double

    Definition Classes
    DLParams
  32. def getMaxEpoch: Int

    Definition Classes
    DLParams
  33. def getOptimMethod: OptimMethod[T]

    Definition Classes
    DLParams
  34. final def getOrDefault[T](param: Param[T]): T

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

    Definition Classes
    Params
  36. final def getPredictionCol: String

    Definition Classes
    HasPredictionCol
  37. def getVectorSeq(row: Row, colType: DataType, index: Int): Seq[AnyVal]

    Definition Classes
    VectorCompatibility
  38. final def hasDefault[T](param: Param[T]): Boolean

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

    Definition Classes
    Params
  40. def hasParent: Boolean

    Definition Classes
    Model
  41. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  42. def internalTransform(dataFrame: DataFrame): DataFrame

    Perform a prediction on featureCol, and write result to the predictionCol.

    Perform a prediction on featureCol, and write result to the predictionCol.

    Attributes
    protected
    Definition Classes
    DLModel → DLTransformerBase
  43. final def isDefined(param: Param[_]): Boolean

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

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

    Definition Classes
    Params
  46. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  47. final val learningRate: DoubleParam

    learning rate for the optimizer in the DLEstimator.

    learning rate for the optimizer in the DLEstimator. Default: 0.001

    Definition Classes
    DLParams
  48. final val learningRateDecay: DoubleParam

    learning rate decay for each iteration.

    learning rate decay for each iteration. Default: 0

    Definition Classes
    DLParams
  49. def log: Logger

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  56. def logName: String

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  61. final val maxEpoch: IntParam

    number of max Epoch for the training, an epoch refers to a traverse over the training data Default: 100

    number of max Epoch for the training, an epoch refers to a traverse over the training data Default: 100

    Definition Classes
    DLParams
  62. val model: Module[T]

    trainned BigDL models to use in prediction.

  63. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  66. final val optimMethod: Param[OptimMethod[T]]

    optimization method to be used.

    optimization method to be used. BigDL supports many optimization methods like Adam, SGD and LBFGS. Refer to package com.intel.analytics.bigdl.optim for all the options. Default: SGD

    Definition Classes
    DLParams
  67. def outputToPrediction(output: Tensor[T]): Any

    Attributes
    protected
  68. lazy val params: Array[Param[_]]

    Definition Classes
    Params
  69. var parent: Estimator[DLModel[T]]

    Definition Classes
    Model
  70. final val predictionCol: Param[String]

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

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

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

    Attributes
    protected
    Definition Classes
    Params
  74. def setBatchSize(value: Int): DLModel.this.type

  75. final def setDefault(paramPairs: ParamPair[_]*): DLModel.this.type

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

    Attributes
    protected
    Definition Classes
    Params
  77. def setFeatureSize(value: Array[Int]): DLModel.this.type

  78. def setFeaturesCol(featuresColName: String): DLModel.this.type

  79. def setParent(parent: Estimator[DLModel[T]]): DLModel[T]

    Definition Classes
    Model
  80. def setPredictionCol(value: String): DLModel.this.type

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

    Definition Classes
    AnyRef
  82. def toString(): String

    Definition Classes
    Identifiable → AnyRef → Any
  83. def transform(dataFrame: DataFrame): DataFrame

    Definition Classes
    DLTransformerBase → Transformer
  84. def transform(dataset: DataFrame, paramMap: ParamMap): DataFrame

    Definition Classes
    Transformer
  85. def transform(dataset: DataFrame, firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame

    Definition Classes
    Transformer
    Annotations
    @varargs()
  86. def transformSchema(schema: StructType): StructType

    Definition Classes
    DLModel → PipelineStage
  87. def transformSchema(schema: StructType, logging: Boolean): StructType

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

    Definition Classes
    DLModel → Identifiable
  89. val validVectorTypes: Seq[VectorUDT]

    Definition Classes
    VectorCompatibility
  90. def validateDataType(schema: StructType, colName: String): Unit

    Validate if feature and label columns are of supported data types.

    Validate if feature and label columns are of supported data types. Default: 0

    Attributes
    protected
    Definition Classes
    DLParams
  91. def validateParams(): Unit

    Definition Classes
    Params
  92. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from DLParams[T]

Inherited from HasBatchSize

Inherited from VectorCompatibility

Inherited from HasPredictionCol

Inherited from HasFeaturesCol

Inherited from DLTransformerBase[DLModel[T]]

Inherited from Model[DLModel[T]]

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