SQL Call
SELECT * FROM NaiveBayesTextClassifierPredict_MLE (
ON complaints_test_tokenized AS PredictorValues PARTITION BY doc_id
ON complaints_tokens_model AS model DIMENSION
USING
ModelType ('Bernoulli')
DocIdColumns ('doc_id')
OutputProb ('true')
Responses ('crash','no_crash')
IsTokenized ('true')
InputTokenColumn ('token')
) AS dt;
Output
doc_id prediction loglik_crash loglik_no_crash prob_crash prob_no_crash
------ ---------- ------------------- ------------------- ---------------------- --------------------
1 no_crash -132.10325317747862 -98.49860380435018 2.5449907661962356E-15 0.9999999999999976
2 no_crash -106.52437650125837 -93.54448794091992 2.306242764321942E-6 0.9999976937572356
3 no_crash -104.73220045214514 -74.58391833912108 8.068028793134146E-14 0.9999999999999194
4 no_crash -109.99456675440749 -80.17356682652391 1.1191911993954088E-13 0.9999999999998881
5 crash -115.57301460364334 -117.93953912203749 0.9142387530879915 0.08576124691200848
6 no_crash -131.86161385361245 -116.23728916712048 1.6384829784677584E-7 0.9999998361517022
7 crash -111.86019002535706 -115.60577093239516 0.9769232146518676 0.023076785348132414
8 no_crash -111.20673632593761 -92.09852084699338 5.028141098952846E-9 0.999999994971859
9 no_crash -117.17799816572807 -108.97820056038807 2.746337196143095E-4 0.9997253662803857
10 no_crash -105.26809971346323 -82.77619397083092 1.7056481534316895E-10 0.9999999998294351