-
Book Overview & Buying
-
Table Of Contents
Mastering .NET Machine Learning
By :
We had a brief introduction to Math.Net in Chapter 1, Welcome to Machine Learning Using the .NET Framework. In this section, we will add it to our project and see how it can help us do a simple linear regression. In the solution explorer of your open project, add a new script file and name it MathDotNet.fsx.
Next, open the NuGet Package Manager Console (Tools | NuGet Package Manger | Package Manager Console):

In the console, enter the following line:
PM> install-package MathNet.Numerics
You will see that the package installs successfully:

Close the Package Manager Console and the readme.txt file that opens when you install Math.NET. In the future, I will assume that you know how to open and enter commands to install NuGet packages.
In the script file, create the same input that we saw in the hand-rolled script and calculate the means of x and y:
let input = [|1,1.;2,2.;3,2.25;4,4.75;5,5.|] let x = input |> Array.map(fun (x,y) -> float x) let y = input |>...
Change the font size
Change margin width
Change background colour