Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Activities ( 5 Marks ) First Activity ( Students Grade Class Classification based KNN ) The dataset of students' performance contains 2 3 9

Lab Activities (5 Marks)
First Activity (Students Grade Class Classification based KNN)
The dataset of students' performance contains 2392 instances of data, and each instance is described by 7 attributes (including the label attribute). Students are classified to five grades from 0 to 4.
Activity Requirements:
Deploy a code for each of the following parts (each part in a separate file) with the following activities to detect students' grade class using the previous mentioned dataset (Students Performance.csv)
Load the dataset and present the characteristics of the dataset
Build a k-nearest neighbor classification model with test size 20% and k=10
Assess the performance of the classifier using Training and test (compute accuracy and cross validation).
Using cross-validation, compute the best value of the parameter k(with a range of k=1,3,5,dots,30)
Plot a relation between k and the misclassification error
Compute the accuracy of the model using the best k .
Notes:
The best value of k ensures the lowest misclassification error.
The misclassification error =1- classification score
Second Activity (Classification based Nave Bayes)
The dataset of customers' segmentation contains 7741 instances of data, and each instance is described by 6 attributes (including the label attribute). Students are classified to four segments grades from A to D.
Activity Requirements:
Deploy a code for each of the following parts (each part in a separate file) with the following activities to detect customers' segment class using the previous mentioned dataset (Customers segmentation.csv)
Load the dataset and present the characteristics of the dataset
Split the dataset into features (x) and labels ( y )
Convert categorical variables into a numerical representation
Split the data into training and testing sets
Create a Naive Bayes classifier
Train the classifier
Make predictions on the test set
Calculate the accuracy of the classifier
Calculate conditional probabilities
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions