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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.