Skip to content

decision Tree 有bug 啊 #25

Open
Open

Description

@weishengkui

def _createTree(self,X,y,featureIndex):
有一个返回分支 #所有label都相同的话,则停止分割,返回该label
if labelList.count(labelList[0]) == len(labelList):
return labelList[0]
当输入数据所有的类别都相同的时候,myTree 被y值覆盖了。

Activity

  1. NisarAhmad7 commented on Oct 31, 2026

    @NisarAhmad7

    Hi! I'd like to work on this issue and investigate the reported bug. Before I start, I wanted to ask if this issue is still relevant and reproducible in the current version of the project. If so, I'd be happy to investigate the problem, write a test case, and submit a fix through a Pull Request. Thank you!

  2. Jiayi-Luo commented on Oct 31, 2026

    @Jiayi-Luo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions