• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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: 66537
251
  • 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...
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!