com.intel.analytics.zoo.models.recommendation

WideAndDeep

class WideAndDeep[T] extends Recommender[T]

The Wide and Deep model used for recommendation.

T

Numeric type of parameter(e.g. weight, bias). Only support float/double now.

Linear Supertypes
Recommender[T], ZooModel[Tensor[T], Tensor[T], T], Container[Tensor[T], Tensor[T], T], AbstractModule[Tensor[T], Tensor[T], T], InferShape, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WideAndDeep
  2. Recommender
  3. ZooModel
  4. Container
  5. AbstractModule
  6. InferShape
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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 ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. def accGradParameters(input: Tensor[T], gradOutput: Tensor[T]): Unit

    Definition Classes
    ZooModel → AbstractModule
  7. def addModel(model: AbstractModule[Tensor[T], Tensor[T], T]): WideAndDeep.this.type

    Definition Classes
    ZooModel
  8. def apply(name: String): Option[AbstractModule[Activity, Activity, T]]

    Definition Classes
    Container → AbstractModule
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def backward(input: Tensor[T], gradOutput: Tensor[T]): Tensor[T]

    Definition Classes
    AbstractModule
  11. var backwardTime: Long

    Attributes
    protected
    Definition Classes
    AbstractModule
  12. def build(): WideAndDeep.this.type

    Definition Classes
    ZooModel
  13. def buildModel(): AbstractModule[Tensor[T], Tensor[T], T]

    Override this method to define a model.

    Override this method to define a model.

    Definition Classes
    WideAndDeepZooModel
  14. def canEqual(other: Any): Boolean

    Definition Classes
    Container → AbstractModule
  15. final def checkEngineType(): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  16. def clearState(): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  17. final def clone(deepCopy: Boolean): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    AbstractModule
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def cloneModule(): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    AbstractModule
  20. val continuousCols: Array[String]

    Data of continuousCols is treated as continuous values for the deep model.

  21. val embedInDims: Array[Int]

    Input dimension of the data in embedCols.

    Input dimension of the data in embedCols. The dimensions of the data in embedCols should be within the range of embedInDims.

  22. val embedOutDims: Array[Int]

    The dimensions of embeddings.

  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def equals(other: Any): Boolean

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  25. final def evaluate(): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  26. final def evaluate(dataSet: LocalDataSet[MiniBatch[T]], vMethods: Array[_ <: ValidationMethod[T]]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  27. final def evaluate(dataset: RDD[Sample[T]], vMethods: Array[_ <: ValidationMethod[T]], batchSize: Option[Int]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  28. final def evaluateImage(imageFrame: ImageFrame, vMethods: Array[_ <: ValidationMethod[T]], batchSize: Option[Int]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  29. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def findModules(moduleType: String): ArrayBuffer[AbstractModule[_, _, T]]

    Definition Classes
    Container
  31. final def forward(input: Tensor[T]): Tensor[T]

    Definition Classes
    AbstractModule
  32. var forwardTime: Long

    Attributes
    protected
    Definition Classes
    AbstractModule
  33. def freeze(names: String*): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  34. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  35. def getExtraParameter(): Array[Tensor[T]]

    Definition Classes
    Container → AbstractModule
  36. final def getInputShape(): Shape

    Definition Classes
    InferShape
  37. final def getName(): String

    Definition Classes
    AbstractModule
  38. final def getNumericType(): TensorDataType

    Definition Classes
    AbstractModule
  39. final def getOutputShape(): Shape

    Definition Classes
    InferShape
  40. def getParametersTable(): Table

    Definition Classes
    Container → AbstractModule
  41. final def getPrintName(): String

    Attributes
    protected
    Definition Classes
    AbstractModule
  42. final def getScaleB(): Double

    Definition Classes
    AbstractModule
  43. final def getScaleW(): Double

    Definition Classes
    AbstractModule
  44. def getTimes(): Array[(AbstractModule[_ <: Activity, _ <: Activity, T], Long, Long)]

    Definition Classes
    Container → AbstractModule
  45. final def getTimesGroupByModuleType(): Array[(String, Long, Long)]

    Definition Classes
    AbstractModule
  46. final def getWeightsBias(): Array[Tensor[T]]

    Definition Classes
    AbstractModule
  47. var gradInput: Tensor[T]

    Definition Classes
    AbstractModule
  48. final def hasName: Boolean

    Definition Classes
    AbstractModule
  49. def hashCode(): Int

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  50. val hiddenLayers: Array[Int]

    Units of hidden layers for the deep model.

    Units of hidden layers for the deep model. Array of positive integers. Default is Array(40, 20, 10).

  51. val indicatorDims: Array[Int]

    Dimensions of indicatorCols.

    Dimensions of indicatorCols. The dimensions of the data in indicatorCols should be within the range of indicatorDims.

  52. def inputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

    Definition Classes
    AbstractModule
  53. def inputs(nodes: Array[ModuleNode[T]]): ModuleNode[T]

    Definition Classes
    AbstractModule
  54. def inputs(nodes: ModuleNode[T]*): ModuleNode[T]

    Definition Classes
    AbstractModule
  55. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  56. final def isTraining(): Boolean

    Definition Classes
    AbstractModule
  57. var line: String

    Attributes
    protected
    Definition Classes
    AbstractModule
  58. final def loadModelWeights(srcModel: Module[Float], matchAll: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  59. final def loadWeights(weightPath: String, matchAll: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  60. def model: AbstractModule[Tensor[T], Tensor[T], T]

    The defined model, either from buildModel() or loaded from file.

    The defined model, either from buildModel() or loaded from file.

    Definition Classes
    ZooModel
  61. val modelType: String

    String.

    String. "wide", "deep", "wide_n_deep" are supported. Default is "wide_n_deep".

  62. val modules: ArrayBuffer[AbstractModule[Activity, Activity, T]]

    Definition Classes
    Container
  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. val numClasses: Int

    The number of classes.

    The number of classes. Positive integer.

  67. var output: Tensor[T]

    Definition Classes
    AbstractModule
  68. def parameters(): (Array[Tensor[T]], Array[Tensor[T]])

    Definition Classes
    Container → AbstractModule
  69. final def predict(dataset: RDD[Sample[T]], batchSize: Int, shareBuffer: Boolean): RDD[Activity]

    Definition Classes
    AbstractModule
  70. final def predictClass(dataset: RDD[Sample[T]], batchSize: Int): RDD[Int]

    Definition Classes
    AbstractModule
  71. def predictClasses(x: RDD[Sample[T]], batchSize: Int = 1, zeroBasedLabel: Boolean = true): RDD[Int]

    Predict for classes.

    Predict for classes. By default, label predictions start from 0.

    x

    Prediction data, RDD of Sample.

    batchSize

    Number of samples per batch. Default is 32.

    zeroBasedLabel

    Boolean. Whether result labels start from 0. Default is true. If false, result labels start from 1.

    Definition Classes
    ZooModel
  72. final def predictImage(imageFrame: ImageFrame, outputLayer: String, shareBuffer: Boolean, batchPerPartition: Int, predictKey: String, featurePaddingParam: Option[PaddingParam[T]]): ImageFrame

    Definition Classes
    AbstractModule
  73. def predictUserItemPair(featureRdd: RDD[UserItemFeature[T]]): RDD[UserItemPrediction]

    Predict for user-item pairs.

    Predict for user-item pairs.

    featureRdd

    RDD of user item pair feature.

    returns

    RDD of user item pair prediction.

    Definition Classes
    Recommender
  74. def processInputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

    Attributes
    protected
    Definition Classes
    AbstractModule
  75. def processInputs(nodes: Seq[ModuleNode[T]]): ModuleNode[T]

    Attributes
    protected
    Definition Classes
    AbstractModule
  76. final def quantize(): Module[T]

    Definition Classes
    AbstractModule
  77. def recommendForItem(featureRdd: RDD[UserItemFeature[T]], maxUsers: Int): RDD[UserItemPrediction]

    Recommend a number of users for each item given a rdd of user item pair features.

    Recommend a number of users for each item given a rdd of user item pair features.

    featureRdd

    RDD of user item pair feature.

    maxUsers

    Number of users to be recommended to each item. Positive integer.

    returns

    RDD of user item pair prediction.

    Definition Classes
    Recommender
  78. def recommendForUser(featureRdd: RDD[UserItemFeature[T]], maxItems: Int): RDD[UserItemPrediction]

    Recommend a number of items for each user given a rdd of user item pair features.

    Recommend a number of items for each user given a rdd of user item pair features.

    featureRdd

    RDD of user item pair feature.

    maxItems

    Number of items to be recommended to each user. Positive integer.

    returns

    RDD of user item pair prediction.

    Definition Classes
    Recommender
  79. def release(): Unit

    Definition Classes
    Container → AbstractModule
  80. def reset(): Unit

    Definition Classes
    Container → AbstractModule
  81. def resetTimes(): Unit

    Definition Classes
    Container → AbstractModule
  82. final def saveCaffe(prototxtPath: String, modelPath: String, useV2: Boolean, overwrite: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  83. final def saveDefinition(path: String, overWrite: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  84. def saveModel(path: String, weightPath: String = null, overWrite: Boolean = false): WideAndDeep.this.type

    Save the model to the specified path.

    Save the model to the specified path.

    path

    The path to save the model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like "hdfs://[host]:[port]/xxx". Amazon S3 path should be like "s3a://bucket/xxx".

    weightPath

    The path to save weights. Default is null.

    overWrite

    Whether to overwrite the file if it already exists. Default is false.

    Definition Classes
    ZooModel
  85. final def saveModule(path: String, weightPath: String, overWrite: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  86. final def saveTF(inputs: Seq[(String, Seq[Int])], path: String, byteOrder: ByteOrder, dataFormat: TensorflowDataFormat): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  87. final def saveTorch(path: String, overWrite: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  88. final def saveWeights(path: String, overWrite: Boolean): Unit

    Definition Classes
    AbstractModule
  89. var scaleB: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  90. var scaleW: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  91. final def setExtraParameter(extraParam: Array[Tensor[T]]): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  92. final def setLine(line: String): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  93. final def setName(name: String): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  94. def setScaleB(b: Double): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  95. def setScaleW(w: Double): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  96. final def setWeightsBias(newWeights: Array[Tensor[T]]): WideAndDeep.this.type

    Definition Classes
    AbstractModule
  97. def summary(): Unit

    Print out the summary of the model.

    Print out the summary of the model.

    Definition Classes
    ZooModel
  98. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  99. def toGraph(startNodes: ModuleNode[T]*): Graph[T]

    Definition Classes
    AbstractModule
  100. def toString(): String

    Definition Classes
    AbstractModule → AnyRef → Any
  101. var train: Boolean

    Attributes
    protected
    Definition Classes
    AbstractModule
  102. final def training(): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  103. def unFreeze(names: String*): WideAndDeep.this.type

    Definition Classes
    Container → AbstractModule
  104. def updateGradInput(input: Tensor[T], gradOutput: Tensor[T]): Tensor[T]

    Definition Classes
    ZooModel → AbstractModule
  105. def updateOutput(input: Tensor[T]): Tensor[T]

    Definition Classes
    ZooModel → AbstractModule
  106. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. val wideBaseDims: Array[Int]

    Dimensions of wideBaseCols.

    Dimensions of wideBaseCols. The dimensions of the data in wideBaseCols should be within the range of wideBaseDims.

  110. val wideCrossDims: Array[Int]

    Dimensions of crossed columns.

    Dimensions of crossed columns. The dimensions of the data in wideCrossCols should be within the range of wideCrossDims.

  111. def zeroGradParameters(): Unit

    Definition Classes
    AbstractModule

Deprecated Value Members

  1. final def save(path: String, overWrite: Boolean): WideAndDeep.this.type

    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.0) please use recommended saveModule(path, overWrite)

Inherited from Recommender[T]

Inherited from ZooModel[Tensor[T], Tensor[T], T]

Inherited from Container[Tensor[T], Tensor[T], T]

Inherited from AbstractModule[Tensor[T], Tensor[T], T]

Inherited from InferShape

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped