You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/06 23:19:25 UTC

[jira] [Commented] (MADLIB-928) error in Random Forest

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

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

GitHub user orhankislal opened a pull request:

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

    Random Forest: Fix filtered feature related bug

    JIRA: MADLIB-928
    
    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 features. The commit fixes this issue as well as 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/37.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 #37
    
----
commit afd54374fef04c1e0b643bcab903b66e5b78f66f
Author: Orhan Kislal <ok...@pivotal.io>
Date:   2016-04-06T21:07:26Z

    Random Forest: Fix filtered feature related bug
    
    JIRA: MADLIB-928
    
    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 features. The commit fixes this issue as well as 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)