ONNXPredict Example with sckikit-learn | Vantage BYOM - 3.0 - ONNXPredict Example: scikit-learn - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Product
Teradata Vantage
Release Number
3.0
Published
May 2022
Last Update
2022-06-02
Content Type
User Guide
Publication ID
B700-1111-051K
Language
English (United States)
select * from mldb.ONNXPredict(
    on (select  * sample 10 from iris_test )
    on (select * from onnx_models where model_id='sklearn_rf_iris_model') DIMENSION
    using
        Accumulate('sepal_length')
) as td
;
 
 *** Query completed. 10 rows found. 2 columns returned.
 *** Total elapsed time was 1 second.
    sepal_length   json_report
----------------- ----------------------------------------------------
 5.60000000000000E 000      {"output_probability":{"0":0.0,"1":0.99999934,"2":0.0},"output_label":[1]}
 6.70000000000000E 000      {"output_probability":{"0":0.0,"1":0.0,"2":0.99999934},"output_label":[2]}
 5.00000000000000E 000      {"output_probability":{"0":0.99999934,"1":0.0,"2":0.0},"output_label":[0]}
 5.10000000000000E 000      {"output_probability":{"0":0.99999934,"1":0.0,"2":0.0},"output_label":[0]}
 6.90000000000000E 000      {"output_probability":{"0":0.0,"1":0.0,"2":0.99999934},"output_label":[2]}
 5.10000000000000E 000      {"output_probability":{"0":0.99999934,"1":0.0,"2":0.0},"output_label":[0]}
 6.50000000000000E 000      {"output_probability":{"0":0.0,"1":0.98999935,"2":0.01},"output_label":[1]}
 6.70000000000000E 000      {"output_probability":{"0":0.0,"1":0.0,"2":0.99999934},"output_label":[2]}
 6.10000000000000E 000      {"output_probability":{"0":0.0,"1":0.12999998,"2":0.86999947},"output_label":[2]}
 4.90000000000000E 000      {"output_probability":{"0":0.99999934,"1":0.0,"2":0.0},"output_label":[0]}