Linear regression is a technique that is used in Machine Learning to predict the outcome of a variable based on the linearity of the input. That is, the predicted values will have a continuous range and not discrete. Continous values can be prices, time, etc., while discrete data includes things such as pets, headphones, and more. The process of regression is mostly used to forecast and determine relationships between two or more variables. The cost function is used to find out the actual learning rate by determining the error between the predicted value and the actual value. The concept of gradient descent is used to understand how big or small the learning rate has been in every step of the way. More so, it determines the number of steps that are needed for the algorithm to learn.
If you are looking for an online course to learn Machine Learning, I recommend this Machine Learning Certification program by Intellipaat.