SQL-MapReduce Call to Predict Outcomes of Test Table Data - Aster Analytics

Teradata AsterĀ® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Language
English (United States)
Last Update
2018-04-17
dita:mapPath
uce1497542673292.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1022
lifecycle
previous
Product Category
Software

You can provide the model table either as an input file (as in the first call) or in the Model attribute (as in the second call). When you provide the model table as an input file, you must specify PARTITION BY ANY and the Responses argument.

DROP TABLE IF EXISTS nb_iris_predict;

CREATE TABLE nb_iris_predict (PARTITION KEY(id)) AS
SELECT * FROM NaiveBayesPredict (
  ON nb_iris_input_test PARTITION BY ANY
  ON nb_iris_model AS model DIMENSION
  IDCol ('id')
  NumericInputs ('[1:4]')
  Responses ('virginica', 'setosa', 'versicolor')
) ORDER BY id;
DROP TABLE IF EXISTS nb_iris_predict;

CREATE TABLE nb_iris_predict (PARTITION KEY(id)) AS
SELECT * FROM NaiveBayesPredict (
  ON nb_iris_input_test
  Model ('nb_iris_model')
  IDCol ('id')
  NumericInputs ('[1:4]')
) ORDER BY id;