Context:
I picked up data-set from here and tried to run Logistic Regression on it. Since I am not very much aware of MATLAB, I converted "Strings" to "Numbers" with my own using "NUMBERS" software.
What I want to achieve:
After running the LR algorithm when I tried to predict the value of existing data points, I am getting values ranging between 0-1 (as it should be), but since my job it to predict whether it is either 0 (yes) or 1 (no), that means I need to find a cut-off line (threshold) in my prediction (This could probably be done by comparing actual value by predicted value).
Question:
How can I figure out the threshold for predicted result such that result is assumed to be 1 if predicted value > threshold, otherwise 0?
Predicted values can be found here. I am assuming predicted values are correct as cost curve is showing asymptotic nature. I have pushed my work here, you may want to cross-validate and provide me few more key points.