Git Product home page Git Product logo

eecs_4412_a2's Introduction

EECS_4412_A2 DECISION TREES:

  • A simple Decision tree program
  • Part 1: creating a function to determine if a node is an Internal or a Leaf node
  • Part 2: Creating a function that calculates the entropy (Measure of Impurity in the data) of a node to be used for splitting a node based on the Information Gain criterion
  • Part 3: Use the entropy function to calculate the Information Gain of a node to determine which attribute is the best attribute to split on
  • Part 4: Use the functions created in Part 2 & 3 to determine the best attribute that has the highest Information Gain so that the values (examples) in the node can be split on that attribute
  • Part 5: Splitting the nodes at each level by using the above functions using the information gaain criteria.
    • What the function does: 2

    • Structure of the variables:

      • The dataframe of the previous level that we will create the children from:
         dataframe_dict = {"Node_1_1": the dataframe at the root node}
      • after first pass:
           dataframe_dict = {
            "Node_2_1": dataframe_2_1,
            "Node_2_2": dataframe_2_2,
            "Node_2_3": dataframe_2_3
        }
      • Attributes remaining after splitting the nodes at each level:
        • remaining_attrs = {"Node_1_1": ["BUYING", "MAINTENANCE", "DOORS", "PERSONS", "LUG_BOOT", "SAFETY"]}
        • after first pass (assuming we're splitting on attr "PERSONS"):
        •   remaining attrs = {
              "Node_2_1": ["BUYING", "MAINTENANCE", "DOORS", "LUG_BOOT", "SAFETY"],
             "Node_2_2": ["BUYING", "MAINTENANCE", "DOORS", "LUG_BOOT", "SAFETY"],
             "Node_2_3": ["BUYING", "MAINTENANCE", "DOORS", "LUG_BOOT", "SAFETY"]
          }
      • The tree model which contains information about the current state of the tree:
        • tree_model = [tree_connectivity, node_types, node_labels]
      • visual rep. of what will be store in the tree_model: 3
      • After first pass: 4

eecs_4412_a2's People

Contributors

nadim365 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.