ALSTrain - Aster Analytics

Teradata AsterĀ® Spark Connector User Guide

Product
Aster Analytics
Release Number
7.00.00.01
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
dbt1482959363906.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
dbt1482959363906
lifecycle
previous
Product Category
Software

The ALSTrain class defines a wrapper function that uses the Aster Spark API to generate an Alternating Least Square (ALS) model from sample data. The model is typically used by the ALSRun function.

Run Method Signature

run (input: RDD(DataRow), SparkFunctParams: String): RDD(DataRow)

Input

Three columns:
  • user identifier (INTEGER)
  • product identifier (INTEGER)
  • rating (DOUBLE PRECISION in range [1.0, 5.0])

Output

Model, saved in the Spark-side file system, which can be used later for prediction.

Invocation Example

SELECT * FROM RunOnSpark (
  ON ratings
  SPARKCODE ('com.teradata.aster.functions.ALSTrain /tmp/ALSModel1 true 10 2.0 20 2 2 false')
  OUTPUTS ('user_id integer', 'product_id integer', 'rating double precision')
)
ORDER BY user_id;

Version

Spark 1.3 and later.