MLeapPredict Example: Classification Model - Teradata Vantage

Teradata Vantage™ - Bring Your Own Model User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Lake
Product
Teradata Vantage
Release Number
20.00
Published
February 2026
ft:locale
en-US
ft:lastEdition
2026-02-18
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274
select * from td_MLDB.MLeapPredict(
      on (select top 10 * from iris_example) as InputTable
      on (select model_id, model from mleap_models where model_id='mleap_gmm_iris') as ModelTable DIMENSION
      using
      Accumulate('id')
      ModelInputFieldsMap('scaled_features=sepal_length, sepal_width, petal_length, petal_width')
  ) as dt;
 *** Query completed. 10 rows found. 3 columns returned. 
 *** Total elapsed time was 2 seconds.
         id          59
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}
         id          36
 prediction 2
json_report {"json_report":"{\"species\":\"2\",\"probability\":\"[9.872724177144841E-10, 7.250175645539524E-6, 0.999992748837082]\"}","prediction":"2"}
         id          97
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}
         id          15
 prediction 2
json_report {"json_report":"{\"species\":\"2\",\"probability\":\"[4.377884158500902E-11, 5.635062522241812E-7, 0.999999436449969]\"}","prediction":"2"}
         id          74
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}
         id          53
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}
         id         137
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}
         id          99
 prediction 2
json_report {"json_report":"{\"species\":\"2\",\"probability\":\"[0.3333332008203208, 0.3333332008203208, 0.3333335983593585]\"}","prediction":"2"}
         id          19
 prediction 2
json_report {"json_report":"{\"species\":\"2\",\"probability\":\"[2.588390161190085E-10, 2.588390161191292E-10, 0.999999999482322]\"}","prediction":"2"}
         id         122
 prediction 0
json_report {"json_report":"{\"species\":\"0\",\"probability\":\"[0.3333333333333333, 0.3333333333333333, 0.3333333333333333]\"}","prediction":"0"}