Skip to content

madhusudanhasbe/decision-tree-in-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Implementation of Decision Tree in C language

A decision tree is a flowchart-like tree structure where each internal node denotes the feature, branches denote the rules, and the leaf nodes denote the result of the algorithm.

Objectives

  • This project aims to implement a decision tree to assess scholarship eligibility.
  • The project introduces a user-friendly decision tree implementation for scholarship eligibility, by developing a customizable decision tree structure, enhancing the flexibility to adapt eligibility criteria to their specific requirements.
  • Additionally, the program facilitates checking of past result analysis and allows processing of it.

Requirements

  • The project does not have specific hardware requirements beyond what is typically found in a standard PC.
  • The project was implemented using the C programming language and compiled using GCC (GNU Compiler Collection).
  • Notepad is used as a text editor file for the log file.

Methodology of Implementation

  1. Decision Tree Construction:
  • Initialize the decision tree by creating nodes for different conditions (e.g., year, GPA, coding skills, attendance).
  • Establish the hierarchical relationships between nodes by defining the "yes" and "no" paths.
  1. User Interaction
  • Present a user-friendly interface to collect input from the student.
  • Gather information from the student, including year of study, GPA, coding skills, attendance, and gender.
  1. Decision Making
  • Start the decision process at the root node of the decision tree.
  • Evaluate each condition based on the student's input:
    1. Check if the student's year of study is within the eligible range.
    2. Verify if the GPA meets the minimum requirement.
    3. Assess if the student has coding skills.
    4. Examine attendance and gender to make the final decision.
  • Follow the appropriate "yes" or "no" path based on the evaluation of each condition until reaching a final decision node.
  1. Determine Eligibility
  • If the decision tree leads to an "eligible" node, conclude that the student is eligible for a scholarship.
  • If the tree leads to a "not eligible" node, determine that the student is not eligible.
  1. Log Results
  • Log the scholarship eligibility results in a log file, including student information and the outcome of the assessment.
  1. User Interaction (Optional)
  • Ask the user if they want to continue checking eligibility for other students.
  1. Viewing Past Results (Optional)
  • Provide an option to view past scholarship eligibility results.
  • Allow the user to delete specific entries or all entries from the log file.
  1. Settings Menu (Optional)
  • Implement a settings menu for users to adjust minimum GPA, minimum attendance, and eligible year range.
  • Store and update these settings for future assessments.
  1. Project Completion
  • The project concludes after the user decides to exit or when all eligible students have been assessed.

About

Implemented a decision tree program in C language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages