Github user iyerr3 commented on a diff in the pull request:

    https://github.com/apache/madlib/pull/309#discussion_r209783744
  
    --- Diff: src/ports/postgres/modules/elastic_net/test/elastic_net.sql_in ---
    @@ -839,3 +839,55 @@ SELECT elastic_net_train(
     SELECT * FROM house_en;
     SELECT * FROM house_en_summary;
     SELECT * FROM house_en_cv;
    +
    +-- Test grouping on non-numeric column
    +
    +DROP TABLE IF EXISTS grouping_test_non_numeric;
    +CREATE TABLE grouping_test_non_numeric ( id INT,
    +   tax INT,
    +   bedroom INT,
    +   bath FLOAT,
    +   price INT,
    +   size INT,
    +   lot INT,
    +   zipcode TEXT,
    +   testbool boolean);
    +INSERT INTO grouping_test_non_numeric (id, tax, bedroom, bath, price, 
size, lot, zipcode, testbool) VALUES
    +   (1  ,  590 ,       2 ,    1 ,  50000 ,  770 , 22100  , 'test', 'true'),
    +   (2  , 1050 ,       3 ,    2 ,  85000 , 1410 , 12000  , 'test2', 'true'),
    +   (3  ,   20 ,       3 ,    1 ,  22500 , 1060 ,  3500  , 'test', 'false'),
    +   (4  ,  870 ,       2 ,    2 ,  90000 , 1300 , 17500  , 'test2', 
'false');
    +
    +DROP TABLE IF EXISTS grouping_test_non_numeric_en1, 
grouping_test_non_numeric_en1_summary;
    +SELECT elastic_net_train( 'grouping_test_non_numeric',                  -- 
Source table
    +    'grouping_test_non_numeric_en1',               -- Result table
    +    'price',                   -- Dependent variable
    +    'array[tax, bath, size]',  -- Independent variable
    +    'gaussian',                -- Regression family
    +    0.5,                       -- Alpha value
    +    0.1,                       -- Lambda value
    +    TRUE,                      -- Standardize
    +    'zipcode',                 -- Grouping column(s)
    --- End diff --
    
    I've added a change that allows the quoted column name to work. I would 
request others to review this PR as well. 


---

Reply via email to