1.1 - 8.10 - KNN Syntax - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Version 2.3

SELECT * FROM KNN (
  ON training_table AS TrainingData
  ON test_table AS TestData
  [ OUT TABLE OutputTable (output_table) ]
  USING
  K (k)
  ResponseColumn ('response_column')
  
  IDColumn ('test_id_column')
  DistanceFeatures ({ 'df_column' | df_column_range }[,... ])
  [ VotingWeight (voting_weight) ]
  [ CustomizedDistance ('jar', 'distance_class') ]
  [ ForceMapReduce ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
  [ PartitionColumn ('partition_column') ]
  [ PartitionBlockSize (partition_block_size) ]
  [ OutputProb ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
  [ Accumulate ({ 'accumulate_column' | accumulate_column_range }[,...]) ]
) AS alias;