Skip to content

Analysis of the Titanic dataset using Decision Trees in R. Demonstrates how to pre-process data, build a decision tree model & visualize it.

Notifications You must be signed in to change notification settings

DeeptejD/Decision-Trees-in-R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decision Tree Analysis in R (Titanic Dataset)

This repository contains an analysis of the Titanic using Decision Trees in R. The project demonstrates how to preprocess data, build a decision tree model & visualize it.

A Decision Tree is a supervised machine learning algorithm used for classification and regression tasks. It models decisions based on feature values, splitting data into branches at each node. Read More

Limited_Complexity_Tree

Dataset

The dataset used is a cleaned version of the Titanic dataset from Kaggle. It contains the following features:

  • Survived: Survival status (0 = No, 1 = Yes)
  • Pclass: Ticket class (1st, 2nd, 3rd)
  • Sex: Gender (Male, Female)
  • Age: Age of passenger
  • SibSp: Number of siblings/spouses aboard
  • Parch: Number of parents/children aboard
  • Fare: Ticket fare

Steps to run

To run this project, ensure you have R and RStudio installed.

  1. Clone the respository: https://github.com/DeeptejD/Decision-Trees-in-R
  2. Open decision_tree.R in RStudio.
  3. Run the script to:
  • Load and preprocess the Titanic dataset.
  • Train a decision tree model.
  • Visualize the decision tree.
  • Evaluate model performance.

References

Decision Tree Classification Clearly Explained - Normalized Nerd (YouTube)

Introduction to R: Decision Trees - DataDaft (YouTube)

About

Analysis of the Titanic dataset using Decision Trees in R. Demonstrates how to pre-process data, build a decision tree model & visualize it.

Topics

Resources

Stars

Watchers

Forks

Languages