When linear regression is used
The first Machine algorithm I learned was Linear regression. I was fascinated by how the gradient descent algorithm works, and here is the examples of when linear regression is used.
Prediction of stock price: This sounds sketchy, but it is actually used. The stock price can be affected by various factors such as news events and economic indicators, so it is used to predict the stock price.
Estimating housing price: This is the most common example. Place, the number of rooms, and other factors affect the price. Therefore, the linear regression can predict the housing price.
Sales forecast: It can forecast sales of a product or service based on historical sales data and other relevant factors such as marketing campaigns and economic indicators.
Linear regression is useful when the relationship between features and target is fairly linear. If it is nonlinear, it is wise to choose other machine learning algorithms.