GithubHelp home page GithubHelp logo

anny8910 / decision-tree-classification-on-diabetes-dataset Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 23.0 1.96 MB

It shows how to build and optimize Decision Tree Classifier of "Diabetes dataset" using Python Scikit-learn package.

Jupyter Notebook 100.00%

decision-tree-classification-on-diabetes-dataset's Introduction

Decision-Tree-Classification-on-Diabetes-Dataset

It shows how to build and optimize Decision Tree Classifier of "Diabetes dataset" using Python Scikit-learn package. A decision tree is a flowchart-like tree structure where an internal node represents feature(or attribute), the branch represents a decision rule, and each leaf node represents the outcome. The topmost node in a decision tree is known as the root node. It learns to partition on the basis of the attribute value. It partitions the tree in recursively manner call recursive partitioning. This flowchart-like structure helps you in decision making. It's visualization like a flowchart diagram which easily mimics the human level thinking. That is why decision trees are easy to understand and interpret.

  1. Importing Required Libraries Let's first load the required libraries.

2.Loading Data Let's first load the required Diabetes dataset using pandas read CSV function. You can download the data here (datasets_set.csv)

  1. Feature Selection Here, you need to divide given columns into two types of variables dependent(or target variable) and independent variable(or feature variables).

  2. Splitting Data To understand model performance, dividing the dataset into a training set and a test set is a good strategy.

Let's split the dataset by using function train_test_split(). You need to pass 3 parameters features, target, and test_set size.

  1. Building Decision Tree Model Let's create a Decision Tree Model using Scikit-learn.

  2. Evaluating Model Let's estimate, how accurately the classifier or model can predict the type of cultivars.

Accuracy can be computed by comparing actual test set values and predicted values.

7.Visualizing Decision Trees

decision-tree-classification-on-diabetes-dataset's People

Contributors

anny8910 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.