Performing regression without AutoML
This chapter will continue the same regression experiment from Chapter 8 that focuses on predicting market values for footballers based on their stats.
We’ll start by bringing in ML.NET, AutoML, and our DataFrame
, as well as a number of imports we’ll need in this chapter. We’ll also declare our MLContext
and give it a random seed for repeatability:
#r "nuget:Microsoft.ML,3.0.1" #r "nuget:Microsoft.ML.AutoML,0.21.1" #r "nuget:Microsoft.Data.Analysis,0.21.1" using Microsoft.Data.Analysis; using Microsoft.ML; using Microsoft.ML.Data; using Microsoft.ML.AutoML; using Microsoft.ML.AutoML.CodeGen; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Transforms; using Microsoft.ML.SearchSpace; using Microsoft.ML.SearchSpace.Option; using Microsoft.ML.Runtime; MLContext context = new(seed: 123);
Next, we’ll load up our data into a DataFrame
and split it into...