Histogram Example: AutoBin ('Scott') - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

SQL Call

DROP TABLE cars_scott_out;
SELECT * FROM Histogram(
  ON cars_hist AS InputTable
  OUT TABLE OutputTable(cars_scott_out)
  USING
  AutoBin('Scott')
  TargetColumn('hp')
) AS dt ORDER BY 1;

Output

 output_table                      output_columns                              
 --------------------------------- ------------------------------------------- 
 specified in OutputTable argument bin bin_start bin_end bin_count bin_percent
SELECT * FROM cars_scott_out ORDER BY 1;
 bin bin_start bin_end bin_count bin_percent 
 --- --------- ------- --------- ----------- 
   0       0.0   100.0         9       28.13
   1     100.0   200.0        16          50
   2     200.0   300.0         6       18.75
   3     300.0   400.0         1        3.13

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