The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Error on Decision Tree

CB513CB513 Member Posts: 3 Learner I
I received the error "Wrong Criterion" The least square criterion cannot be used for nominal labels. I had changed my data from nominal to numerical so I am not sure where this is coming from. I did not have this issue when I wasn't using pruning. Any advice?

Answers

  • vivek101vivek101 Member Posts: 8 Contributor II
    Hi @CB513,

    You are solving a classification problem with nominal labels by employing the least square criterion, as indicated by the error message you received. The least squares criterion is intended for regression problems with numerical labels, not classification problems with nominal tags, so this is against the rules.

    You referenced that you changed your information from ostensible to mathematical, yet it's conceivable that there are still a few ostensible marks in your dataset that are causing this mistake. Before running your model, check that all of your labels are numerical.

    You also said that you didn't have this problem when you didn't use pruning. In decision trees, pruning is a method used to avoid overfitting. Conceivable pruning is causing the issue, as it very well might be attempting to involve the most un-square rule for order despite the fact that it's not permitted.

    Using a different criterion that works well for classification problems with nominal labels, like the information gain criterion or the Gini impurity criterion, could be one option. Another arrangement is utilizing an alternate calculation more qualified for your information, for example, a help vector machine or a brain organization.

    In synopsis, guarantee every one of your marks is mathematical, and think about utilizing an alternate basis or calculation on the off chance that the issue continues to happen.

    Thank you.
    Vivek Garg
    React Native
Sign In or Register to comment.