khannaekta commented on code in PR #614: URL: https://github.com/apache/madlib/pull/614#discussion_r1509518453
########## src/ports/postgres/modules/pmml/test/pmml_ordinal.sql_in: ########## @@ -208,44 +215,63 @@ INSERT INTO "Multinom_test"("FEAT1", feat2, cat, g) VALUES (2,67,2,'B'), (2,65,2,'B'), (2,62,2,'B'); +ALTER TABLE "Ordinal_test" ADD COLUMN id SERIAL; --- training function for logit link +-- logit drop table if exists ordinal_logit, ordinal_logit_summary; SELECT ordinal( - '"Multinom_test"', + '"Ordinal_test"', 'ordinal_logit', 'cat', 'ARRAY["FEAT1", feat2]', '0<1<2', 'logit' ); +DROP TABLE IF EXISTS ordinal_predict_out; SELECT ordinal_predict('ordinal_logit','"Ordinal_test"', 'ordinal_predict_out', 'probability'); +SELECT test_pmml_output('"Ordinal_test"', 'ordinal_logit', 'ordinal_predict_out', 'id', '0', 'probability_0'); +SELECT test_pmml_output('"Ordinal_test"', 'ordinal_logit', 'ordinal_predict_out', 'id', '1', 'probability_1'); +SELECT test_pmml_output('"Ordinal_test"', 'ordinal_logit', 'ordinal_predict_out', 'id', '2', 'probability_2'); + +DROP TABLE IF EXISTS ordinal_predict_out; SELECT ordinal_predict('ordinal_logit','"Ordinal_test"', 'ordinal_predict_out', 'response'); +SELECT test_pmml_output('"Ordinal_test"', 'ordinal_logit', 'ordinal_predict_out', 'id', 'category', 'predicted_cat_pmml_prediction'); + --- training function for probit link +-- probit drop table if exists ordinal_probit, ordinal_probit_summary; SELECT ordinal( - '"Multinom_test"', + '"Ordinal_test"', 'ordinal_probit', 'cat', 'ARRAY["FEAT1", feat2]', - '0<1<2', + '2<0<1', Review Comment: why did we change this order? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@madlib.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org