0% found this document useful (0 votes)
15 views

AI Assignment 2

The crew of a spacecraft called Stellaris that has become stranded due to technical issues faces challenges to survive and return home. The spacecraft's AI systems have access to crew data but documents with specialized roles have been lost. The task is to use a decision tree classifier on the crew dataset to predict roles based on attributes like age and gender. The solution loads the dataset, preprocesses the data by dropping rows with missing values, splits the data into features and targets, trains a decision tree model, and evaluates the model's performance using various metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

AI Assignment 2

The crew of a spacecraft called Stellaris that has become stranded due to technical issues faces challenges to survive and return home. The spacecraft's AI systems have access to crew data but documents with specialized roles have been lost. The task is to use a decision tree classifier on the crew dataset to predict roles based on attributes like age and gender. The solution loads the dataset, preprocesses the data by dropping rows with missing values, splits the data into features and targets, trains a decision tree model, and evaluates the model's performance using various metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Artificial Intelligence

Assignment no # 2

Submitted by:

Name: Muhammad Ashan Zahid Enrollment No: 01-131202-021


Name: Muhammad Umar Nawaz Enrollment No: 01-131202-039

Class: BSE 5A
Submitted to: DR RAJA MUHAMMAD SULEMAN
Date: 02-06-2023
Problem:
In a future where intergalactic travel is a reality, a spacecraft named Stellaris embarks on a mission to
explore distant planets. However, due to a technical malfunction, the spacecraft loses power, leaving
the crew stranded. The crew faces numerous challenges as they strive to survive and find their way back
home. The spacecraft is equipped with advanced AI systems that have access to a vast amount of data,
including information about the crew members' skills, experience, and expertise. However, due to the
chaotic nature of the anomaly, vital records and documents have been lost, making it difficult to
determine the crew members' specialized roles and technical skills. This is where the classification task
becomes crucial. Your mission is to use the Decision Tree classifier algorithm on the spacecraft dataset
to predict the crew members' specialized roles based on various attributes.

Solution:
1. Problem Statement: Find the specialized roles of crew members based on various attributes e.g.,
age, gender.
2. Dataset Exploration: The dataset contained information about crew members, their age, gender,
technical skills, and the specialized roles that were assigned to them. We loaded the dataset into
Colab to analyze and understand the dataset. This involved displaying the first and last few rows,
summary of classes, and information about the dataset. We also tried to visualize most of the
information.
3. Data Preprocessing: The we performed data preprocessing and feature engineering. This included
handling missing values by dropping rows with missing values.
4. Splitting the Dataset: We split the dataset into features (X) and the target variable (y), where X
contains all the independent variables except 'specialized_role' and 'crew_member_id', and y
contains the 'specialized_role' column.
5. Model Training: We instantiated a DecisionTreeClassifier and fit it to the training data
6. Model Evaluation: We made predictions on the testing set using the trained model and calculated
various evaluation metrics such as accuracy, precision, recall, and F1-score. These metrics help
assess the performance of the model in predicting the specialized roles.

Colab Link:

https://colab.research.google.com/drive/1eust1C3CDfFEiqc7eQNOsE9X6OxdIz1J?usp=sharing

You might also like