• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Decision Tree

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody have a code example of building a basic decision tree?

I'm having issues with the concept from a java standpoint. Seeing
code always helps me understand it better.

Thanks very much.
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried writing it in Pseudo code? Give it a go and post your results here, we can then help you with the Java aspects
 
T Williams
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response. I think I worded it wrong. I'm OK with writing the java code.

The actual concept of building the tree from a logic standpoint is probably where I'm going wrong.

I understand the concept of the Decision Tree just not how to go about building one programmatically...so I guess psuedo code is probably what I'm looking for...so this may be the wrong forum.

Any advice oh where to get this?

thanks
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you get your hands on an artificial intelligence book? Decision trees are often taught as part of AI.

Try Russell and Norvig's AI book (2002 edition) from Prentice-Hall; there should be something in there.
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also look at the Wikipedia article. It shows diagrammatically how a decision tree can be put together, so quickly you can see that you have nodes, with weighted connections to other nodes. Those are going to be your first 2 programming constructs...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic