A cost function in layman’s term is a term used to represent how far the result is from the real value. A cost function in linear regression is the quantified value of error that is how deviated it is from the actual value.
Learn machine-learning from industry experts and get certified, come and join Machine learning course from Intellipaat and become a certified professional.
Want to have a visual-aid in understanding better about machine learning? Then have a look at our YouTube video on Cost Function In Machine Learning With Example and get started.