oriental_express Posted November 24, 2008 Share Posted November 24, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/133952-id3-algorithm-decision-tree-in-php/ Share on other sites More sharing options...
DeanWhitehouse Posted November 24, 2008 Share Posted November 24, 2008 To create php files you would just use fwrite Quote Link to comment https://forums.phpfreaks.com/topic/133952-id3-algorithm-decision-tree-in-php/#findComment-697337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.