[ 
https://issues.apache.org/jira/browse/MADLIB-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15229279#comment-15229279
 ] 

ASF GitHub Bot commented on MADLIB-928:
---------------------------------------

GitHub user orhankislal opened a pull request:

    https://github.com/apache/incubator-madlib/pull/39

    Random Forest: Fix filtered feature related bug

    JIRA: MADLIB-928
    
    Additional Author: Nandish Jayaram <[email protected]>
    
    Random forest filters out a feature if it has the same value for every
    row. If grouping is enabled, this filer is applied per group. However
    _get_bins_grps function did not consider a case where different groups
    have different feature sets. The commit fixes this issue, adds a test
    for install-check to replicate the use case and fixes a typo in one of
    the related functions.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/orhankislal/incubator-madlib 
bugfix/random_forest3

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-madlib/pull/39.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #39
    
----
commit 1b75152b1245f11b6aa449b4e84189468b40e92d
Author: Orhan Kislal <[email protected]>
Date:   2016-04-06T21:07:26Z

    Random Forest: Fix filtered feature related bug
    
    JIRA: MADLIB-928
    
    Additional Author: Nandish Jayaram <[email protected]>
    
    Random forest filters out a feature if it has the same value for every
    row. If grouping is enabled, this filer is applied per group. However
    _get_bins_grps function did not consider a case where different groups
    have different feature sets. The commit fixes this issue, adds a test
    for install-check to replicate the use case and fixes a typo in one of
    the related functions.

----


> error in Random Forest 
> -----------------------
>
>                 Key: MADLIB-928
>                 URL: https://issues.apache.org/jira/browse/MADLIB-928
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Module: Random Forest
>            Reporter: Tetsuo Kobayashi
>            Assignee: Orhan Kislal
>            Priority: Minor
>             Fix For: v1.9.1
>
>
> I am currently having an error with the MADlib Random Forest function in 
> MADlib 1.8.0.  Below is the code I tried. 
> SELECT madlib.forest_train('data_random_forest', -- input table name
>                            'rf_output', -- output table name
>                            'id', -- id column
>                            'duration', -- dependent variable
>                            '*',  -- list of features
>                            'start_time, end_time, date_only, loc_code, 
> amedas_code',  -- exclude columns
>                            'linkid' -- grouping column
>                          ,10::integer -- # of trees
>                            ,2::integer,  -- # of random features
>                            TRUE::boolean, -- importance
>                            1,  -- # of permutations
>                            10, -- max_tree_depth
>                            8,  -- min_split
>                            3,  -- min_bucket
>                            10  -- number of splits per continuous variable
>                            );  
> I got an error which tells me something is wrong with the feature 
> "holiday_flg) which is a dummy variable. When I excluded "holiday_flg," the 
> error message tells me that the "KeyError: 'sun_flg' which is another dummy 
> variable. I got another dummy variable in "KeyError:" when I excluded 
> "sun_flg." I can tell one of the dummy variables in the model is picked up in 
> the error message when I exclude one. 
> I was told by Rahul Iyer that this is most probably because at least 1 group 
> has only 1 level for (some) categorical variables. This can happen and I saw 
> some groups have identical value for all records. 
> I am using MADlib 1.8.0 on GPDB 4.3.6.1. The OS is CentOS.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to