org.apache.spark.ml

DLModel

class DLModel[T] extends DLTransformerBase[DLModel[T]] with DLParams 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} for Spark 1.5, 1.6 and org.apache.spark.ml.linalg.{Vector, VectorUDT} for Spark 2.0+. 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
HasBatchSize, DLTransformerBase[DLModel[T]], DLParams, HasPredictionCol, HasFeaturesCol, Model[DLModel[T]], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DLModel
  2. HasBatchSize
  3. DLTransformerBase
  4. DLParams
  5. HasPredictionCol
  6. HasFeaturesCol
  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
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. def batchOutputToPrediction(output: Tensor[T]): Iterable[_]

    Attributes
    protected
  9. final val batchSize: Param[Int]

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

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

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

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

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

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

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

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

    Definition Classes
    Params
  18. def explainParams(): String

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

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

    Definition Classes
    Params
  21. 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).

  22. final val featuresCol: Param[String]

    Definition Classes
    HasFeaturesCol
  23. def finalize(): Unit

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

    Definition Classes
    Params
  25. final def getBatchSize: Int

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

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

    Definition Classes
    Params
  28. def getFeatureArrayCol: String

    Attributes
    protected
    Definition Classes
    DLParams
  29. def getFeatureSize: Array[Int]

  30. final def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  31. final def getOrDefault[T](param: Param[T]): T

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

    Definition Classes
    Params
  33. final def getPredictionCol: String

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

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

    Definition Classes
    Params
  36. def hasParent: Boolean

    Definition Classes
    Model
  37. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  38. def internalTransform(featureData: RDD[Seq[AnyVal]], dataset: DataFrame): DataFrame

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

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

    featureData

    featureData in the format of Seq

    returns

    output DataFrame

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

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

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

    Definition Classes
    Params
  42. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  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. val model: Module[T]

    trainned BigDL models to use in prediction.

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

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

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

    Definition Classes
    AnyRef
  59. lazy val params: Array[Param[_]]

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

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

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

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

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

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

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

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

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

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

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

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

  72. def supportedTypesToSeq(row: Row, colType: DataType, index: Int): Seq[AnyVal]

    Definition Classes
    DLParams
  73. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  74. def toArrayType(dataset: DataFrame): RDD[Seq[AnyVal]]

    Attributes
    protected
    Definition Classes
    DLTransformerBase
  75. def toString(): String

    Definition Classes
    Identifiable → AnyRef → Any
  76. def transform(dataset: DataFrame): DataFrame

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

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

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

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

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

    Definition Classes
    DLModel → Identifiable
  82. def validateParams(): Unit

    Definition Classes
    Params
  83. def validateSchema(schema: StructType): Unit

    Attributes
    protected
    Definition Classes
    DLParams
  84. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HasBatchSize

Inherited from DLTransformerBase[DLModel[T]]

Inherited from DLParams

Inherited from HasPredictionCol

Inherited from HasFeaturesCol

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