1.0 - 8.00 - NaiveBayesTextClassifierTrainer Syntax - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

NaiveBayesTextClassifierTrainer version 1.7, NaiveBayesTextClassifierInternal version 1.5

SELECT * FROM NaiveBayesTextClassifierTrainer (
  ON (
    SELECT * FROM NaiveBayesTextClassifierInternal (
      ON token_table AS tokens PARTITION BY doc_category_column 
      [ ON categories_table AS categories DIMENSION ]
      [ ON stop_words_table AS stop_words DIMENSION ]
      USING
      TokenColumn ('token_column')
      [ ModelType ({ 'Multinomial' | 'Bernoulli' }) ]
      [ DocIDColumns ({ 'doc_id_column' | doc_id_column_range }[,...])]
      DocCategoryColumn ('doc_category_column')
      [ CategoryColumn ('category_column') |
      Categories ('category' [,...]) ]
      [ StopWordsColumn ('stop_words_column') |
      StopWords ('word' [,...]) ]
    ) AS alias_1
  ) PARTITION BY 1
) AS alias_2;