Skip to content
Avni Mehta edited this page Feb 9, 2018 · 2 revisions

Team Members:

Name: Avni Mehta, Class Id: 11

Name: (Trinadha) Raji Muppala, Class Id: 14

Task Objective:

For the given dataset, calculate the confusion matrix and other metrics.

Input:

The input for this task is list of expected and predicted class (man/woman)

Dataset

Code

After importing libraries and setting configuration, we read the data and split by tab. The class labels are converted into double (1 = man, 0 = woman). The dataset is printed on the console.

Based on the predictions and actual labels, confusion matrix is calculated using confusionMatrix function of MulticlassMetrics class. We are storing the values for TP, FN, FP and TN into variables a,b,c,d.

Based on the standard formula, we are printing values for accuracy, error rate, precision, recall, etc.

Output

The output is printed on the console.

Contritbution of Team Members:

100% for both since both team members completed the assignment individually.

Clone this wiki locally