, . x is a sensor feature, and y contains Labels for two states.
Procedure
Tabulate predictions from the rule x>4 and the true labels.
Change the Threshold to 3,4,5 and record misclassified samples and Accuracy.
Results to retain
An 8-row prediction table and a table of 3 threshold conditions.
Items to record and points to check
Threshold
Number of correct predictions
Accuracy
Misclassified x values
Points to check
Did you separate input features, true labels, and predictions into different columns?
2. Data with One Changed Label
Starting conditions
Preserve the original y, change one Label using y2=y.copy(); y2[3]=1, and compare Thresholds 3,4,5 again.
Procedure
Keep x and Thresholds unchanged, and create the modified version using y2=y.copy(); y2[3]=1. Recompute the x > threshold predictions for each Threshold.
For both the original and modified labels, calculate the misclassified sample indices, their count, and accuracy. Record one table row per threshold.
Identify the input, prediction, and true label of the changed sample, and explain which Thresholds had their classification correctness affected by that single Label change.
Results to retain
A table of misclassifications and Accuracy by Threshold before and after the Label change.
Items to record and points to check
Threshold
Label condition
Misclassified indices and count
Accuracy
Points to check
Did you change only the labels while keeping inputs and thresholds unchanged?
3. Checking Other Inputs
Starting conditions
Apply the selected threshold unchanged to , .
Procedure
Choose one of the three thresholds above and record your choice first. Apply the same x > threshold rule to the four new inputs.
Record inputs, predictions, provided Labels, and matches in four rows, and calculate Accuracy. Place it beside the Accuracy for the original 8 samples and Labels from Activity 1 using the same Threshold, and explain the difference.
Results to retain
A prediction table for four new inputs and an Accuracy comparison between the baseline and new data.
Items to record and points to check
Threshold used
New inputs and true labels
Prediction and match status
Accuracy on baseline and new inputs
Points to check
Did you keep the selected Threshold unchanged for new inputs?