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

    https://github.com/apache/incubator-madlib/pull/69#discussion_r86223466
  
    --- Diff: src/ports/postgres/modules/utilities/in_mem_group_control.py_in 
---
    @@ -54,6 +54,18 @@ class BaseState(object):
                        ret_states=None, **kwargs):
             self.update(col_grp_key, col_grp_state, ret_states)
     
    +    def get_last_state_value_for_elasticnet(self):
    +        ## Naming this function as something specific to elastic net
    +        ## because this behavior might not be what a different 
    +        ## algorithm might need out of obtaining the last state value.
    +        ## The last element in value[] represents the log_likelihood
    +        ## of a group-specific state, for Elastic Net. If the 
log_likelihood
    +        ## of even a single group is not 0, we return 1. 
    +
    +        if any([value[len(value)-1] for value in 
self._state.itervalues()]):
    --- End diff --
    
    You can get the last value as `value[-1]`. 
    I suggest just calling it `get_last_state_value` even if it's just used in 
`elasticnet`. If you want to keep the specific `elasticnet` use case, then 
let's move this to elastic net file. 


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