Class Word2VecModel.Word2VecModelWriter$

Object
org.apache.spark.ml.feature.Word2VecModel.Word2VecModelWriter$
Enclosing class:
Word2VecModel

public static class Word2VecModel.Word2VecModelWriter$ extends Object
  • Field Details

  • Constructor Details

    • Word2VecModelWriter$

      public Word2VecModelWriter$()
  • Method Details

    • calculateNumberOfPartitions

      public int calculateNumberOfPartitions(long bufferSizeInBytes, int numWords, int vectorSize)
      Calculate the number of partitions to use in saving the model. [SPARK-11994] - We want to partition the model in partitions smaller than spark.kryoserializer.buffer.max
      Parameters:
      bufferSizeInBytes - Set to spark.kryoserializer.buffer.max
      numWords - Vocab size
      vectorSize - Vector length for each word
      Returns:
      (undocumented)