The goal of a linear regression is to determine the vector
Visually, machine learning "magic" is picking the line that minimizes the total distance of the green lines.
A logistic regression is similar to a linear regression, but instead predicts a probability, e.g. given this much rain, probability of a flood?
You can think of the problem as what parameters maximize the likelyhood of our (training) data occuring?
Pick parameters
such that the following is maximized (likelyhood)