Problem 3: Evaluate Predictions Against Actual Labels
Easypython
Problem Description
Write a Python program that trains a Logistic Regression model, makes predictions on a small test set, and manually calculates the accuracy (percentage of correct predictions) without using any built-in accuracy function.
Input
Training data and a small labeled test set.
Output
The manually calculated accuracy.
Constraints
- Test set will have at least 4 examples.
Example Input
textX_test=[[2],[4],[6],[8]], y_test=[0,0,1,1]
Example Output
textAccuracy: 0.75
Concepts Covered
.predict(), manual accuracy calculation, loops.