kaknikhil commented on code in PR #614:
URL: https://github.com/apache/madlib/pull/614#discussion_r1509594259


##########
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:
   I added a new order to test "2<0<1". The original "0<1<2" still exists in 
the `pmml_ordinal.sql_in` file. The diff tool is a bit confusing



##########
src/ports/postgres/modules/pmml/test/pmml_rf.sql_in:
##########
@@ -29,11 +36,11 @@ DROP TABLE IF EXISTS train_output, train_output_summary, 
train_output_group;
 SELECT forest_train('dt_golf'::text,         -- source table
                          'train_output'::text,    -- output model table
                          'id'::text,              -- id column
-                         'temperature::double precision'::text,           -- 
response
+                         'temperature'::text,           -- response
                          'humidity, windy'::text,   -- features
                          NULL::text,        -- exclude columns
                          'class'::text,      -- grouping
-                         5::integer,     -- num_trees
+                         3::integer,     -- num_trees

Review Comment:
   Yes



-- 
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

Reply via email to