NaiveBayesTextClassifierTrainer Syntax - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™

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;