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

    https://github.com/apache/incubator-madlib/pull/35#discussion_r58965306
  
    --- Diff: src/ports/postgres/modules/convex/utils_regularization.py_in ---
    @@ -47,14 +46,22 @@ def __utils_dep_var_scale(**kwargs):
         The output will be stored in a temp table: a mean array and a std array
     
         This function is also used in lasso.
    +
    +    Parameters:
    +    schema_madlib -- madlib schema
    +    tbl_data -- original data
    +    col_ind_var -- independent variables column
    +    col_dep_var -- dependent variable column
         """
    +
         y_scale = plpy.execute(
             """
             select
    -            avg({col_dep_var}) as mean,
    +            avg(case when not 
{schema_madlib}.array_contains_null({col_ind_var}) then {col_dep_var} end) as 
mean,
                 1 as std
    --- End diff --
    
    I had tried inserting a row into the input table that contains a NULL for 
col_dep_var, and the insert had failed. So I assumed that kind of data is not 
allowed, and thus the check would not be necessary.
    Should we still have a condition out there for col_dep_var?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to