Reference no: EM133112652
Confusion Matrix
Assuming that we are running an experiment on Hong Kong tourists by showing them photos of the popular sights in Hong Kong and then asking them which the direction (i.e. East, South, West, North) for each site relative to where the tourist stands. In other words, the tourists are asked to predict the direction of each site shown to them.
The collected data is as follows:
Ground Truth: ['East', 'West', 'West', 'South', 'North', 'East', 'South', 'East', 'North', 'North', 'North', 'West', 'East', 'South', 'East', 'East', 'South', 'East', 'East', 'North']
Tourist Predictions: ['East', 'West', 'South', 'South', 'East', 'East', 'West', 'West', 'South', 'North', 'East', 'South', 'North', 'South', 'South', 'East', 'South', 'East', 'West', 'South']
Q1: Construct a confusion matrix for the outcomes of the direction prediction data.
Q2: Calculate the precision for predicting sites in the East direction.
Q3: Calculate the F1 score for predicting sites in the East direction.
Q4: Calculate the precision for predicting sites in the South direction.
Q5: Calculate the precision for predicting sites in the West direction.
Q6: Calculate the precision for predicting sites in the North direction.
Q7: Calculate the accuracy of the tourist predictions.
Q8: Calculate the precision of the tourist predictions as an unweighted average of the class precisions.
Q9: Calculate the precision of the tourist predictions as a weighted average of the class precisions.