1.1 - 8.10 - SentimentTrainer Example - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Input

The input table is a collection of user reviews for different products.

InputTable: sentiment_train
id product category review
1 camera POS we primarily bought this camera for high image quality and excellent video capability without paying the price for a dslr. it has excelled in what we expected of it, and consequently represented excellent value for me. all my friends want my camera for their vacations. i would recommend this camera to anybody. definitely worth the price. plus, when you buy some accessories, it becomes even more powerful.
2 office suite POS it is the best office suite i have used to date. it is launched before office 2010 and it is ages ahead of it already. the fact that i could comfortable import xls, doc, ppt and modify them, and then export them back to the doc, xls, ppt is terrific. i needed the compatibility. it is a very intuitive suite and the drag drop functionality is terrific.
3 camera POS this is a nice camera, delivering good quality video images decent photos. light small, using easily obtainable, high quality minidv i love it. minor irritations include touchscreen based menu only digital photos can only be transferred via usb, requiring ilink and usb if you use ilink.
... ... ... ...

SQL Call

SELECT * FROM SentimentTrainer (
  ON sentiment_train AS InputTable
  USING
  TextColumn ('review')
  SentimentColumn ('category')
  OutputModelFile ('sentimentmodel1.bin')
) AS dt;

Output

 train_result                   
 ------------------------------ 
 Model generated.              
 Training time(s): 0.027       
 File name: sentimentmodel1.bin
 File size(KB): 3              
 Model successfully installed

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.