SQL-MapReduce Call - 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

KNNRecommenderTrain uses the input data to generate three model tables: the weights model ('ml_weights'), the bias model table ('ml_bias') and the optional nearest items or neighbors table ('ml_itemngbrs').

DROP TABLE IF EXISTS ml_weights;
DROP TABLE IF EXISTS ml_bias;
DROP TABLE IF EXISTS ml_itemngbrs;

SELECT iternum, rmse::VARCHAR(6) AS rmse FROM KnnRecommenderTrain (
  ON (SELECT 1) PARTITION BY 1
  RatingTable ('ml_ratings')
  UserIdColumn ('userid')
  ItemIdColumn ('itemid')
  RatingColumn ('rating')
  WeightModelTable ('ml_weights')
  BiasModelTable ('ml_bias ')
  NearestItemsTable ('ml_itemngbrs')
  K (15)
  MaxIterNum (20)
  Threshold (0.0002)
  LearningRate (0.001)
) ORDER BY iternum NULLS FIRST;