Open Side Menu
Skip to contentBrand Logo
Forums
Inspiration
Ideas
Communities
Blogs
Learning
Support
RegisterSign In
  1. Microsoft Fabric Community
  2. Power BI forums
  3. Galleries
  4. R Script Showcase
Sharon's avatar
Sharon
Microsoft Employee
10 years ago

Decision Trees

  Description With decision trees, you can visualize the probability of something you want to estimate, based on decision criteria from the historic data. The decision tree classifier aut...
Decision Trees Showcase.pbix1 MB
ScriptInstallPackagesWithWorkaroundsDtree.R1 KB
Advanced Analytics Visualizations
Elizabeth24's avatar
Elizabeth24
New Member
9 years ago

Hello Sharon,

 

I am having some troubles on trying to build a decision tree on power bi, I am quite new here so I think it should be something easy...

 

The error says : "The tree depth is zero"

 

Thanks in advance for your help,

  • boefraty's avatar
    boefraty
    Microsoft Employee
    9 years ago

    Hi Elizabeth24, 

     

    Sometimes algorithm "decides" that adding branches to root of the tree is not useful.

    For example, if you have 90% negatives 10% positives in your data. The accuracy of root node is 0.9 and adding branches may not improve it much.  

     

    You may try to disable cross validation. 

    You may try to make changes in data. 

    You may try to change some parameters, for example:

     

    complexity   =  1e-05 #change  to 1e-10

    minBucket = 2# change to 1

    minRows  =  10 # change to 5

    maxNumAttempts  =  10   #change to 50 

     

     

  • © 2026 Microsoft
  • Manage cookies
  • Privacy & cookies
  • Terms of use
  • Trademarks
Your Privacy Choices Consumer Health Privacy