Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21393#discussion_r189945032
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala ---
    @@ -35,7 +37,87 @@ import org.apache.spark.sql.types.{ArrayType, LongType, 
StructField, StructType}
      */
     @Since("2.4.0")
     @Experimental
    -object PrefixSpan {
    +final class PrefixSpan(@Since("2.4.0") override val uid: String) extends 
Params {
    +
    +  @Since("2.4.0")
    +  def this() = this(Identifiable.randomUID("prefixSpan"))
    +
    +  /**
    +   * the minimal support level of the sequential pattern, any pattern that
    +   * appears more than (minSupport * size-of-the-dataset) times will be 
output
    +   * (default value: `0.1`).
    +   * @group param
    +   */
    +  @Since("2.4.0")
    +  val minSupport = new DoubleParam(this, "minSupport", "the minimal 
support level of the " +
    +    "sequential pattern, any pattern that appears more than (minSupport * 
size-of-the-dataset) " +
    +    "times will be output", ParamValidators.gt(0.0))
    +
    +  /** @group getParam */
    +  @Since("2.4.0")
    +  def getMinSupport: Double = $(minSupport)
    +
    +  /**
    +   * Set the minSupport parameter.
    +   * Default is 1.0.
    +   *
    +   * @group setParam
    +   */
    +  @Since("1.3.0")
    +  def setMinSupport(value: Double): this.type = set(minSupport, value)
    +
    +  /**
    +   * the maximal length of the sequential pattern
    +   * (default value: `10`).
    +   * @group param
    +   */
    +  @Since("2.4.0")
    +  val maxPatternLength = new IntParam(this, "maxPatternLength",
    +    "the maximal length of the sequential pattern",
    +    ParamValidators.gt(0))
    +
    +  /** @group getParam */
    +  @Since("2.4.0")
    +  def getMaxPatternLength: Double = $(maxPatternLength)
    --- End diff --
    
    return `Int`


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to