CoxHazardRatio Example 5: Units Values - 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ā„¢

A standard value or unit value is a value against which an application makes comparisons. Unit values apply only to numerical variables. This example increases the variable karno by 10%, decreases the variable age by 10%, leaves the variable diagtime unchanged, and calculates the hazard ratios.

Input

SQL Call

SELECT * FROM CoxHazardRatio (
  ON lungcancer_coef AS cox_coef_model DIMENSION
  ON (SELECT id, name, karno * (1.1) as karno,
             diagtime * (1) AS diagtime,
             age * (0.9) AS age
        FROM lc_new_predictors) AS predicts PARTITION BY 1
  USING
  PredictFeatureNames ('karno','diagtime','age')
  PredictFeatureUnitsColumns ('karno','diagtime','age')
  ACCUMULATE ('id','name')
) AS dt ORDER BY 1, 2, 3, 4, 5, 6;

Output

Numerical attributes are scaled by the unit values for comparison.

id name karno_units diagtime_units age_units hazardratio
1 John 33.0 4 56.7 0.206751516164483
2 James 88.0 12 36.9 0.0404357176452642
3 Stella 77.0 3 64.8 0.0454693988565714
4 Steffi 66.0 5 56.7 0.070013860059579