An Introduction to Statistical Learning: With Applications in R, Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani, 2013 (Springer) - A standard textbook providing an applied introduction to statistical learning, covering linear regression and the concept of cost functions like Mean Squared Error.
Mathematics for Machine Learning, Marc Peter Deisenroth, A. Aldo Faisal, Cheng Soon Ong, 2020 (Cambridge University Press) - This textbook bridges mathematical topics, including calculus and optimization, directly to their applications in machine learning algorithms, such as defining and minimizing cost functions.
CS229 Lecture Notes, Linear Regression, Andrew Ng, Tengyu Ma, 2022 (Stanford University) - Official lecture notes from a widely acclaimed machine learning course, offering a clear explanation of linear regression, the Mean Squared Error cost function, and its role in optimization.