Solution Review: Analyzing Clustered Data
Review the solution to making a clustering machine learning task meaningful.
Our complete solution is available in the playground below:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>disable</Nullable> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.ML" Version="2.0.1" /> </ItemGroup> <ItemGroup> <None Update="Data\lisbon_house_prices.csv"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> </Project>
Complete clustering solution
Solving the challenge
Before solving the challenge, we first remove the lines that were printing out the distances into the console. Then, in line 48, we create a dictionary object to store the cluster ID against a human-readable property ...