introduction linear regression is a statistical method that is widely used in machine learning. it…