Linear Regression

This Demonstration shows linear regression in action. You can use it to tune a straight line to fit the data and then see the result in the cost function landscape. The optimal solution is also shown.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The hypothesis in linear regression is a fit of the data in the form
with the associated (least-squares) cost function
The problem is to find such that is minimized.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.