Class PrefixSpanModel<Item>

Object
org.apache.spark.mllib.fpm.PrefixSpanModel<Item>
Type Parameters:
Item - item type
All Implemented Interfaces:
Serializable, Saveable

public class PrefixSpanModel<Item> extends Object implements Saveable, Serializable
Model fitted by PrefixSpan param: freqSequences frequent sequences
See Also:
  • Constructor Details

  • Method Details

    • load

      public static PrefixSpanModel<?> load(SparkContext sc, String path)
    • freqSequences

      public RDD<PrefixSpan.FreqSequence<Item>> freqSequences()
    • save

      public void save(SparkContext sc, String path)
      Save this model to the given path. It only works for Item datatypes supported by DataFrames.

      This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/

      The model may be loaded using PrefixSpanModel.load.

      Specified by:
      save in interface Saveable
      Parameters:
      sc - Spark context used to save model data.
      path - Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.