Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Decision Tree

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 69382
276
  • Mark post as helpful
  • send pies
  • 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: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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...
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic