Jump to content

ID3 algorithm Decision tree in php


oriental_express

Recommended Posts

hi there everyone. I need to create a question based decision tree (select the answers), depending on the answer the script will load different questions until the solution is found. I understand the basics of what ID3 des, but what I've been told by my lecturer data can be loaded on to a txt file and somehow the php script can be created based on the decision tree. My questions is how can I do so ? I've looked all over google for 'php decision tree ID3 algorithm' but nothing has come up.

 

I can create the knowledge like the one below, but how do i feed this to a script once

this has been written in txt file ? I would be grateful for any pointers.

 

Age Education Income Marital Status Purchase?

36-55 master's high single will buy

18-35 high school low single won't buy

36-55 master's low single will buy

18-35 bachelor's high single won't buy

< 18 high school low single will buy

18-35 bachelor's high married won't buy

36-55 bachelor's low married won't buy

> 55 bachelor's high single will buy

36-55 master's low married won't buy

> 55 master's low married will buy

 

Link to comment
https://forums.phpfreaks.com/topic/133952-id3-algorithm-decision-tree-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.