Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85D5618688 for ; Wed, 30 Sep 2015 01:20:04 +0000 (UTC) Received: (qmail 97224 invoked by uid 500); 30 Sep 2015 01:20:04 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 97193 invoked by uid 500); 30 Sep 2015 01:20:04 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 97183 invoked by uid 99); 30 Sep 2015 01:20:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2015 01:20:04 +0000 Date: Wed, 30 Sep 2015 01:20:04 +0000 (UTC) From: "Seth Hendrickson (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-10788) Decision Tree duplicates bins for unordered categorical features MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-10788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936219#comment-14936219 ] Seth Hendrickson commented on SPARK-10788: ------------------------------------------ [~josephkb] I'm interested in working on this issue, but I'm not sure I see the problem. Looking through ML RandomForest implementation I found that {{numBins}} for unordered features is {{def numUnorderedBins(arity: Int): Int = 2 * ((1 << arity - 1) - 1)}} and that {{numSplits}} is just {{numBins / 2}}. In the 3 category example: {{numBins = 2 * (( 1 << (3 - 1)) - 1) = 6}} and so the number of splits considered is {{numSplits = 6 / 2 = 3}}. This seems to be the same as in the MLlib implementation. Perhaps I am overlooking something. I'd appreciate any feedback... > Decision Tree duplicates bins for unordered categorical features > ---------------------------------------------------------------- > > Key: SPARK-10788 > URL: https://issues.apache.org/jira/browse/SPARK-10788 > Project: Spark > Issue Type: Improvement > Components: ML > Reporter: Joseph K. Bradley > > Decision trees in spark.ml (RandomForest.scala) effectively creates a second copy of each split. E.g., if there are 3 categories A, B, C, then we should consider 3 splits: > * A vs. B, C > * A, B vs. C > * A, C vs. B > Currently, we also consider the 3 flipped splits: > * B,C vs. A > * C vs. A, B > * B vs. A, C > This means we communicate twice as much data as needed for these features. > We should eliminate these duplicate splits within the spark.ml implementation since the spark.mllib implementation will be removed before long (and will instead call into spark.ml). -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org