Interface CountVectorizerParams

All Superinterfaces:
HasInputCol, HasOutputCol, Identifiable, Params, Serializable, scala.Serializable
All Known Implementing Classes:
CountVectorizer, CountVectorizerModel

public interface CountVectorizerParams extends Params, HasInputCol, HasOutputCol
  • Method Details

    • binary

      BooleanParam binary()
      Binary toggle to control the output vector values. If True, all nonzero counts (after minTF filter applied) are set to 1. This is useful for discrete probabilistic models that model binary events rather than integer counts. Default: false
      Returns:
      (undocumented)
    • getBinary

      boolean getBinary()
    • getMaxDF

      double getMaxDF()
    • getMinDF

      double getMinDF()
    • getMinTF

      double getMinTF()
    • getVocabSize

      int getVocabSize()
    • maxDF

      DoubleParam maxDF()
      Specifies the maximum number of different documents a term could appear in to be included in the vocabulary. A term that appears more than the threshold will be ignored. If this is an integer greater than or equal to 1, this specifies the maximum number of documents the term could appear in; if this is a double in [0,1), then this specifies the maximum fraction of documents the term could appear in.

      Default: (2^63^) - 1

      Returns:
      (undocumented)
    • minDF

      DoubleParam minDF()
      Specifies the minimum number of different documents a term must appear in to be included in the vocabulary. If this is an integer greater than or equal to 1, this specifies the number of documents the term must appear in; if this is a double in [0,1), then this specifies the fraction of documents.

      Default: 1.0

      Returns:
      (undocumented)
    • minTF

      DoubleParam minTF()
      Filter to ignore rare words in a document. For each document, terms with frequency/count less than the given threshold are ignored. If this is an integer greater than or equal to 1, then this specifies a count (of times the term must appear in the document); if this is a double in [0,1), then this specifies a fraction (out of the document's token count).

      Note that the parameter is only used in transform of CountVectorizerModel and does not affect fitting.

      Default: 1.0

      Returns:
      (undocumented)
    • validateAndTransformSchema

      StructType validateAndTransformSchema(StructType schema)
      Validates and transforms the input schema.
    • vocabSize

      IntParam vocabSize()
      Max size of the vocabulary. CountVectorizer will build a vocabulary that only considers the top vocabSize terms ordered by term frequency across the corpus.

      Default: 2^18^

      Returns:
      (undocumented)