Accord.NET

With Math.NET doing all of our heavy lifting, we have a better way to get the results of a simple linear regression. However, there is another way I want to discuss, Accord.NET. Open the NuGet Package Manager and install the following three packages:

  • Accord
  • Accord.Statistics
  • FSharp.Data

Note that you will get a pop-up window when you install FSharp.Data:

Accord.NET

Click on Enable.

Regression

Back in the script file, enter the following lines of code:

#r "../packages/Accord.3.0.2/lib/net40/Accord.dll" #r "../packages/Accord.Statistics.3.0.2/lib/net40/Accord.Statistics.dll" #r "../packages/Accord.Math.3.0.2/lib/net40/Accord.Math.dll" open Accord open Accord.Statistics.Models.Regression.Linear ...

Get Mastering .NET Machine Learning now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.