Dmbi Mini Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

TITLE: IMPLEMENTING DECISION TREE CLASSIFICATION

ALGORITHM FOR APPLICANT DATA.

GROUP MEMBERS
Aniket Goswami : 23
Pradnya Ghorpade: 21
Melvita Gonsalves : 22

Introduction:
In this report we developed a program based on decision tree algorithm. It gives us an idea
that how decision tree will help us to sort or classify things in proper manner. So basically
what is decision tree and how to implement it is include in this report.

Theory:
A decision tree is a decision support tool that uses a tree-like graph or model of decisions and
their possible consequences, including chance event outcomes, resource costs, and utility. It
is one way to display an algorithm that only contains conditional control statements.
Decision trees are commonly used in operations research, specifically in decision analysis, to
help identify a strategy most likely to reach agoal, but are also a popular tool in machine
learning.
Among decision support tools, decision trees (and influence diagrams) have several
advantages. Decision trees:

 Are simple to understand and interpret. People are able to understand decision tree
models after a brief explanation.
 Have value even with little hard data. Important insights can be generated based on
experts describing a situation (its alternatives, probabilities, and costs) and their
preferences for outcomes.
 Allow the addition of new possible scenarios.
 Help determine worst, best and expected values for different scenarios.
 Use a white box model. If a given result is provided by a model.
 Can be combined with other decision techniques.

1
Decision tree elements

Drawn from left to right, a decision tree has only burst nodes (splitting paths) but no sink
nodes (converging paths). Therefore, used manually, they can grow very big and are then
often hard to draw fully by hand. Traditionally, decision trees have been created manually —
as the aside example shows — although increasingly, specialized software is employed.
Decision rules
The decision tree can be linearized into decision rules, where the outcome is the contents of
the leaf node, and the conditions along the path form a conjunction in the if clause. In
general, the rules have the form:
if condition1 and condition2 and condition3 then outcome.
Decision rules can be generated by constructing association rules with the target variable on
the right. They can also denote temporal or causal relations

Design And Implementation


Algorithm:

1. Place the best attribute of the dataset at the root of the tree.
2. Split the training set into subsets. Subsets should be made in such a way that each
subset contains data with the same value for an attribute.
3. Repeat step 1 and step 2 on each subset until you find leaf nodes in all the branches of
the tree.

Code:
import java.io.*;
import java.util.*;
class job

2
{
public static void main(String args[])
{
int marks,tech_certi,extra_curri;
Scanner sc = new Scanner(System.in);
System.out.println("How are your marks? (Excellent=2,Good=1,Average=0):");
marks = sc.nextInt();
if(marks==2){
System.out.println("Do you have any technical certifications? (yes=1/no=0):");
tech_certi = sc.nextInt();
if(tech_certi==1)
{
System.out.println("You got the job!");
}
else if(tech_certi==0)
{
System.out.println("You didn't get the job");
}
else
{
System.out.println("Enter valid input");
}
}
else if(marks==0){
System.out.println("You didn't get the job");
}
else if(marks==1){
System.out.println("Have you participated in any extracurricular activities? (yes=1/no=0):");
extra_curri = sc.nextInt();
if(extra_curri==1)
{
System.out.println("You got the job!");

3
}
else if(extra_curri==0)
{
System.out.println("You didn't get the job");
}
else
{
System.out.println("Enter valid input");
}
}
else{
System.out.print("Enter valid marks");
}
}
}

4
PROJECT OUTPUT:

5
CONCLUSION:
Decision tree algorithm can be used for solving regression and classification problems.
Using Decision trees are commonly used in operations research and operations management.
Hence in this project we implement Decision tree algorithm for classifying job applicant
data.

6
7

You might also like