Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.