Configuring an AutoML Experiments
Learn how to apply an advanced configuration to an AutoML pipeline.
The AutoML library in ML.NET gives us the flexibility of applying advanced configuration to pipelines and overriding default behavior. This is what we'll look at in this lesson. We'll do so with the aid of the following playground, which represents an AutoML pipeline designed for training a house price prediction model.
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <PlatformTarget>x64</PlatformTarget> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.ML.AutoML" Version="0.20.1" /> </ItemGroup> <ItemGroup> <None Update="lisbon-house-prices.csv"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> </Project>
Modifying the input columns
AutoML allows us to exclude columns from the input dataset and change the column data types. For example, we might have a category column where each category is represented by a numeric value. AutoML might incorrectly infer the data type of such a column as numeric, which we can then override.
Changing the column data types and excluding columns from the data are done by the same set of methods, which we demonstrate in lines 15–18 of the Program.cs
file in the playground above.
Lines 15–16: We remove the
latitude
and ...