I have read some the text book about linear regression. Some mentioned that linear regression use least square method for algorithm to learn so i wonder if there something relate between least square method and the cost function that we learn in the course
Linear regression tries to minimize the sum of the squares of the errors.