H2OPredict Example with EnableOptions | Vantage BYOM - H2OPredict Example: EnableOptions - Teradata Vantage

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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Vantage
Release Number
5.0
Published
October 2023
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274
select * from mldb.H2OPredict(
    on (select * FROM winestrain sample 5)
    on (select * from mojo_models where model_id = 'bin_wine_mojo_gbm') DIMENSION
    using
        Accumulate('wine_id')
        EnableOptions('leafnodeassignments','stageprobabilities','contributions')
) as td;
 
 *** Query completed. 5 rows found. 3 columns returned.
 *** Total elapsed time was 1 second.
The following example is a snippet of the total output:
wine_id prediction   json_report
------------------   ---------------------------------
921 0    		   {"label":"0","labelIndex":0,"classProbabilities":{"0":0.9968217623551866,"1":0.0031782376448134496},"contributions":{"fixed_acidity":-0.028360976,"volatile_acidity":-0.088335164,"citric_acid":-0.024260238,"residual_sugar":0.0035657114,"chlorides":-1.4211569,"free_sulfur_dioxide":-0.0348215,"total_sulfur_dioxide":-0.15729481,"density":-0.83206904,"pH":-0.10854881,"sulphates":-0.33070442,"alcohol":0.23698582,"quality":0.0011818114},"leafNodeAssignments":["RLLLL","RLLLL","RLLLL","RLLRR","RLLLL","RLRLR","RLLLL","RLLLR","RLRLL","RLLLR","RLRLL","LRLLL","RLLLR","RLLLR","LRLLL","RLLRL","RLLLR","RLLLL","RLLRL","LRLLL","RLLRL","RLLRL","LRRLR","RLLLL","LRLLL","LRRRR","LRLRL","RLRRL","LRLLR","LRRLR","LLRLR","LLRRL","LRLRL","LRLRR","LLRLL","LLRRR","LRRLL","LLLRL","LRLRL","RLRRR","LLRLR","LLLRL","RLRLR","LLLLR","LLLLL","LLLRR","LRLLR","LLRRR","LLLLR","LLRRL"],"leafNodeAssignmentIds":[51,53,55,57,62,68,55,67,61,63,58,62,69,65,62,65,64,68,65,58,63,72,65,65,55,66,58,73,63,59,52,49,61,50,34,39,58,34,66,49,41,34,56,32,44,32,32,56,41,48],"stageProbabilities":[0.7772755714902997,0.7983368005417208,0.8172459885163265,0.834355429099768,0.8498922476808659,0.8638873916063265,0.8765309976632232,0.8880783431491345,0.898494255900925,0.9079041071430873,0.9163085402925669,0.9239871064220918,0.9309572292274142,0.9372788744664617,0.9429499088299351,0.9481238195007327,0.9528352801551784,0.9570889966764248,0.9609700641928586,0.9644538872300138,0.9676311687573185,0.9705203509759517,0.9730616768029441,0.9749458135516366,0.977028943450525,0.978969047257787,0.980441896652181,0.981918166365765,0.9834493905029154,0.9847757216189877,0.9860551712884301,0.9873685301694476,0.9881356349780801,0.9882050331053199,0.989311303797942,0.9902612070652647,0.9911547062655869,0.9919774083900047,0.9924164181625557,0.9928822362893838,0.9935096456300108,0.9940725835197309,0.9944064044419123,0.9948085538514267,0.9951070885946265,0.9954643876882316,0.9958274822434336,0.9961679939586287,0
       	
3115 0   		   {"label":"0","labelIndex":0,"classProbabilities":{"0":0.9958159157850939,"1":0.004184084214906128},"contributions":{"fixed_acidity":-0.017524125,"volatile_acidity":-0.1100511,"citric_acid":-0.009771999,"residual_sugar":-0.002254068,"chlorides":-1.2320932,"free_sulfur_dioxide":0.004425964,"total_sulfur_dioxide":-0.7059173,"density":-0.5634405,"pH":0.07605002,"sulphates":-0.19357589,"alcohol":0.24024688,"quality":0.0060567474},"leafNodeAssignments":["RLLLL","RLLLL","RLLLL","RLLRR","RLLLL","RLRLR","RLLLL","RLLLR","RLRLL","RLLLR","RLRLL","LRLLL","RLLLR","RLLLR","LRLLL","RLLRL","RLLLR","RLLLL","RLLRL","LRLLL","RLLRL","RLLRL","LRRLR","RLLRL","LRLLL","LRRRR","LRLRL","RLRRL","LRLLR","LRRLR","RLRRL","RLLRL","LRLRL","LRLRR","RLRLL","RLLLR","LRRLL","RLRLL","LRLRL","RLRRR","RLRLR","RLLLR","RLRLR","LLLLR","RLRLR","LLLRR","RRLLR","LLRRR","LLLRR","RLRLR"],"leafNodeAssignmentIds":[51,53,55,57,62,68,55,67,61,63,58,62,69,65,62,65,64,68,65,58,63,72,65,67,55,66,58,73,63,59,61,55,61,50,40,45,58,40,66,49,47,41,56,32,55,32,38,56,43,59],"stageProbabilities":[0.7772755714902997,0.7983368005417208,0.8172459885163265,0.834355429099768,0.8498922476808659,0.8638873916063265,0.8765309976632232,0.8880783431491345,0.898494255900925,0.9079041071430873,0.9163085402925669,0.9239871064220918,0.9309572292274142,0.9372788744664617,0.9429499088299351,0.9481238195007327,0.9528352801551784,0.9570889966764248,0.9609700641928586,0.9644538872300138,0.9676311687573185,0.9705203509759517,0.9730616768029441,0.9752462158255248,0.97730495020249,0.9792222386007325,0.980677706357833,0.9821365011633699,0.9836495439267836,0.984960080465731,0.986203603395797,0.9872382766271293,0.9880131956568143,0.9880833013302995,0.9889011530809275,0.9896682079783109,0.9906155971259627,0.9912073563844488,0.9916881516224257,0.9921983515346883,0.9928069287765684,0.9933496334027299,0.9937239124568823,0.9941748419324398,0.9942053610188495,0.9946281522443251,0.9949790869515106,0.9953885140711287,0.9955
      
...