Class/Object

org.apache.spark.ml.recommendation

GlintFMPairModel

Related Docs: object GlintFMPairModel | package recommendation

Permalink

class GlintFMPairModel extends Model[GlintFMPairModel] with GlintFMPairParams with MLWritable

Model fitted by GlintFMPair.

For simplicity, this implementation uses the parameter servers for recommendation. Real use cases will require a different implementation which exports the linear weights and the latent factors, uses approaches like locality-sensitive hashing for recommendation in sublinear time and does not use parameter servers at recommendation time.

Linear Supertypes
MLWritable, GlintFMPairParams, HasPredictionCol, HasSeed, HasStepSize, HasMaxIter, Model[GlintFMPairModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GlintFMPairModel
  2. MLWritable
  3. GlintFMPairParams
  4. HasPredictionCol
  5. HasSeed
  6. HasStepSize
  7. HasMaxIter
  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
Visibility
  1. Public
  2. All

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 val batchSize: IntParam

    Permalink

    The per-worker mini-batch size Default: 256

    The per-worker mini-batch size Default: 256

    Definition Classes
    GlintFMPairParams
  7. final def clear(param: Param[_]): GlintFMPairModel.this.type

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  12. def destroy(terminateOtherClients: Boolean = false): Unit

    Permalink

    Destroys the model and releases the underlying distributed models and broadcasts.

    Destroys the model and releases the underlying distributed models and broadcasts. This model can't be used anymore afterwards.

    terminateOtherClients

    If other clients should be terminated. This is necessary if a glint cluster in another Spark application should be terminated.

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

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

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

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

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

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

    Permalink
    Definition Classes
    Params
  19. final val factorsReg: FloatParam

    Permalink

    The regularization rate for the latent factor weights Default: 0.001f

    The regularization rate for the latent factor weights Default: 0.001f

    Definition Classes
    GlintFMPairParams
  20. final val filterItemsCol: Param[String]

    Permalink

    The name of the integer arrays column containing the itemCol ids of the items to filter from recommendations.

    The name of the integer arrays column containing the itemCol ids of the items to filter from recommendations. If empty, recommendations are not filtered. Usually the arrays will contain the ids of the items of the user

    Default: ""

    Definition Classes
    GlintFMPairParams
  21. def finalize(): Unit

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

    Permalink
    Definition Classes
    Params
  23. def getBatchSize: Int

    Permalink

    Definition Classes
    GlintFMPairParams
  24. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    Params
  26. def getFactorsReg: Float

    Permalink

    Definition Classes
    GlintFMPairParams
  27. def getFilterItemsCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  28. def getItemCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  29. def getItemfeaturesCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  30. def getLinearReg: Float

    Permalink

    Definition Classes
    GlintFMPairParams
  31. def getLoadMetadata: Boolean

    Permalink

    Definition Classes
    GlintFMPairParams
  32. final def getMaxIter: Int

    Permalink
    Definition Classes
    HasMaxIter
  33. def getMetadataPath: String

    Permalink

    Definition Classes
    GlintFMPairParams
  34. def getNumDims: Int

    Permalink

    Definition Classes
    GlintFMPairParams
  35. def getNumParameterServers: Int

    Permalink

    Definition Classes
    GlintFMPairParams
  36. final def getOrDefault[T](param: Param[T]): T

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

    Permalink
    Definition Classes
    Params
  38. def getParameterServerConfig: Config

    Permalink

    Definition Classes
    GlintFMPairParams
  39. def getParameterServerHost: String

    Permalink

    Definition Classes
    GlintFMPairParams
  40. final def getPredictionCol: String

    Permalink
    Definition Classes
    HasPredictionCol
  41. def getRho: Double

    Permalink

    Definition Classes
    GlintFMPairParams
  42. def getSampler: String

    Permalink

    Definition Classes
    GlintFMPairParams
  43. def getSamplingCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  44. def getSaveMetadata: Boolean

    Permalink

    Definition Classes
    GlintFMPairParams
  45. final def getSeed: Long

    Permalink
    Definition Classes
    HasSeed
  46. final def getStepSize: Double

    Permalink
    Definition Classes
    HasStepSize
  47. def getTreeDepth: Int

    Permalink

    Definition Classes
    GlintFMPairParams
  48. def getUserCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  49. def getUserctxfeaturesCol: String

    Permalink

    Definition Classes
    GlintFMPairParams
  50. final def hasDefault[T](param: Param[T]): Boolean

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

    Permalink
    Definition Classes
    Params
  52. def hasParent: Boolean

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  60. final val itemCol: Param[String]

    Permalink

    The name of the item id column of integers from 0 to number of items in training dataset Default: "itemid"

    The name of the item id column of integers from 0 to number of items in training dataset Default: "itemid"

    Definition Classes
    GlintFMPairParams
  61. final val itemfeaturesCol: Param[String]

    Permalink

    The name of the item feature column of sparse vectors Default: "itemfeatures"

    The name of the item feature column of sparse vectors Default: "itemfeatures"

    Definition Classes
    GlintFMPairParams
  62. final val linearReg: FloatParam

    Permalink

    The regularization rate for the linear weights Default: 0.01f

    The regularization rate for the linear weights Default: 0.01f

    Definition Classes
    GlintFMPairParams
  63. final val loadMetadata: BooleanParam

    Permalink

    Whether the meta data of the data frame to fit should be loaded from HDFS.

    Whether the meta data of the data frame to fit should be loaded from HDFS. This allows skipping the meta data computation stages when fitting on the same data frame with different parameters. Meta data for "cross-batch" and "uniform" sampling is intercompatible but "exp" requires its own meta data

    Default: false

    Definition Classes
    GlintFMPairParams
  64. def log: Logger

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  76. final val maxIter: IntParam

    Permalink
    Definition Classes
    HasMaxIter
  77. final val metadataPath: Param[String]

    Permalink

    The HDFS path to load meta data for the fit data frame from or to save the fitted meta data to.

    The HDFS path to load meta data for the fit data frame from or to save the fitted meta data to. Default: ""

    Definition Classes
    GlintFMPairParams
  78. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  81. final val numDims: IntParam

    Permalink

    The number of latent factor dimensions (k) Default: 150

    The number of latent factor dimensions (k) Default: 150

    Definition Classes
    GlintFMPairParams
  82. final val numParameterServers: IntParam

    Permalink

    The number of parameter servers Default: 3

    The number of parameter servers Default: 3

    Definition Classes
    GlintFMPairParams
  83. final val parameterServerConfig: Param[Config]

    Permalink

    The parameter server configuration.

    The parameter server configuration. Allows for detailed configuration of the parameter servers with the default configuration as fallback. Default: ConfigFactory.empty()

    Definition Classes
    GlintFMPairParams
  84. final val parameterServerHost: Param[String]

    Permalink

    The master host of the running parameter servers.

    The master host of the running parameter servers. If this is not set a standalone parameter server cluster is started in this Spark application. Default: ""

    Definition Classes
    GlintFMPairParams
  85. lazy val params: Array[Param[_]]

    Permalink
    Definition Classes
    Params
  86. var parent: Estimator[GlintFMPairModel]

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

    Permalink
    Definition Classes
    HasPredictionCol
  88. def recommendForUserSubset(dataset: Dataset[_], numItems: Int): DataFrame

    Permalink

    Returns top numItems items recommended for each user id in the input data set

    Returns top numItems items recommended for each user id in the input data set

    dataset

    The dataset containing a column of user ids and user context features. The column names must match userCol, userctxFeaturesCol and, if filtering should be used, also filterItemsCol.

    numItems

    The maximum number of recommendations for each user

    returns

    A dataframe of (userCol: Int, recommendations), where recommendations are stored as an array of (itemCol: Int, score: Float) rows.

  89. final val rho: DoubleParam

    Permalink

    The rho value to use for the "exp" sampler.

    The rho value to use for the "exp" sampler. Has to be between 0.0 and 1.0 Default: 1.0

    Definition Classes
    GlintFMPairParams
  90. final val sampler: Param[String]

    Permalink

    The sampler to use.

    The sampler to use.

    "uniform" means sampling negative items uniformly, as originally proposed for BPR.

    "exp" means sampling negative items with probability proportional to their exponential popularity distribution, as proposed in LambdaFM.

    "crossbatch" means sampling negative items uniformly, but sharing them across the mini-batch as crossbatch-BPR loss, as proposed in my masters thesis.

    Default: "uniform"

    Definition Classes
    GlintFMPairParams
  91. final val samplingCol: Param[String]

    Permalink

    The name of the column of integers to use for sampling.

    The name of the column of integers to use for sampling. If empty all items are accepted as negative items otherwise only items where there does not exist an interaction between the user and the sampling column value of the item. Usually the sampling column is the same as itemCol but it may also be another column with an n-to-1 relation from item column value to sampling column value.

    Consider the example of playlists with "pid" as user column amd tracks with "traid" as item column. Another column "artid" holds the artist of the track. With "traid" as sampling column, only tracks which are not in the playlist are accepted as negative items. With "artid" as sampling column, only tracks whose artists are not in the playlist are accepted as negative item.

    Default: ""

    Definition Classes
    GlintFMPairParams
  92. def save(path: String): Unit

    Permalink
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  93. final val saveMetadata: BooleanParam

    Permalink

    Whether the meta data of the fitted data frame should be saved to HDFS.

    Whether the meta data of the fitted data frame should be saved to HDFS. Default: false

    Definition Classes
    GlintFMPairParams
  94. final val seed: LongParam

    Permalink
    Definition Classes
    HasSeed
  95. final def set(paramPair: ParamPair[_]): GlintFMPairModel.this.type

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  100. def setFilterItemsCol(value: String): GlintFMPairModel.this.type

    Permalink

  101. def setParent(parent: Estimator[GlintFMPairModel]): GlintFMPairModel

    Permalink
    Definition Classes
    Model
  102. val stepSize: DoubleParam

    Permalink
    Definition Classes
    HasStepSize
  103. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  108. def transformSchema(schema: StructType): StructType

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

    Permalink
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  110. final val treeDepth: IntParam

    Permalink

    The depth to use for tree reduce when computing the meta data.

    The depth to use for tree reduce when computing the meta data. To avoid OOM errors, this has to be set sufficiently large but lower depths might lead to faster runtimes

    Definition Classes
    GlintFMPairParams
  111. val uid: String

    Permalink

    The UID

    The UID

    Definition Classes
    GlintFMPairModel → Identifiable
  112. final val userCol: Param[String]

    Permalink

    The name of the user id column of integers Default: "userid"

    The name of the user id column of integers Default: "userid"

    Definition Classes
    GlintFMPairParams
  113. final val userctxfeaturesCol: Param[String]

    Permalink

    The name of the user and context feature column of sparse vectors Default: "userctxfeatures"

    The name of the user and context feature column of sparse vectors Default: "userctxfeatures"

    Definition Classes
    GlintFMPairParams
  114. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    GlintFMPairModel → MLWritable

Inherited from MLWritable

Inherited from GlintFMPairParams

Inherited from HasPredictionCol

Inherited from HasSeed

Inherited from HasStepSize

Inherited from HasMaxIter

Inherited from Model[GlintFMPairModel]

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

getParam

param

setParam

Ungrouped