Decision Tree (01) + Python + SQLite DB + data from file functionality

Decision Tree (01) + Python + SQLite DB + data from file functionality


this folder will contain the decision
trees code and this is the code for decision tree tutorial 01 that I
download so let’s rename it and let’s create another
folder and copy this one and let’s rename this one and this file will create the database
and create and populate the weather and the contact lenses tables so this would
be the database name and this will create and populate the weather table and this creates and populates the
contact lenses table so this function will pick up the
hard-coded data and return it so either the weather or the contact lenses
data and the code here will go under this function and we will no longer need this so to pick up the hard coded data we
will call this driver function passing in the weather through this get code
data method and the contact lenses data through this method also so let’s go
ahead and test run it this is the weather dataset and this is
the information gained for the outlook feature temperature humidity and
windy and this one has the highest information gain so the best feature to
split on is outlook and for the contact lenses dataset this is the information
gain for age spectacle prescription astigmatism and tear prod rate and this
is the highest information gain so the best feature to split on is tear prod rate and let’s go ahead and run this to
create and populate the database okay so let’s try again okay so first let’s delete this and now let’s try
again here we go so this function will pick up the data
from the database given the table name and we will call the driver passing in
the weather data and the contact lenses data so let’s go ahead and run it so let’s do an import import and now run it
again here we go so same thing this is the weather dataset and this is the
information gain for each feature and the best feature to split on is outlook
and same for the contact lenses dataset and let’s go ahead and create this file
that will contain the weather data and this one that will contain the contact lenses data an let’s do an import to handle CSV files and
this will pick up data from a file given the file name and let’s go ahead and the test run it let’s rename this and now let’s try running it here we go so the weather dataset and best
feature to split on is outlook and the contact lenses dataset and the best
feature to split on is tear-prod-rate

One thought on “Decision Tree (01) + Python + SQLite DB + data from file functionality

  • Decision Trees 01 (Python Tutorial) – Find best attribute to split on @ https://youtu.be/303yUAhD_RE

    Decision Tree (01) w/ Python + SQLite DB and file storage and retrieval functionality @ https://youtu.be/L0KbPyMiglU

    Decision Trees 01 w/ JAVA Tutorial @ https://youtu.be/zhY92L2i5AE

    Decision Trees (01) + SQLite DB and file storage + JAVA + Find best attribute to split on @ https://youtu.be/Kla8pn5sIRM

    Decision Trees 02 w/ JAVA (Build tree w/ information gain) @ https://youtu.be/QnJ_fumrhEs

    Decision Trees (02) + SQLite DB and file storage + JAVA + Build Tree @ https://youtu.be/8o9hSJ6MRcc

    Decision Trees 03 (JAVA Tutorial) – Grow XML tree w/ information gain @ https://youtu.be/zy4vILYDVGs

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *