- Hands-On Machine Learning with ML.NET
- Jarred Capellman
- 142字
- 2021-06-24 16:43:32
The EmploymentHistory class
The EmploymentHistory class is the container class that contains the data to both predict and train our model. These columns map in order for the sample data reviewed previously. If you begin experimenting with new features and add to this list, ensure you increment the array index appropriately:
using Microsoft.ML.Data;
namespace chapter03.ML.Objects
{
public class EmploymentHistory
{
[LoadColumn(0)]
public float DurationInMonths { get; set; }
[LoadColumn(1)]
public float IsMarried { get; set; }
[LoadColumn(2)]
public float BSDegree { get; set; }
[LoadColumn(3)]
public float MSDegree { get; set; }
[LoadColumn(4)]
public float YearsExperience { get; set; }
[LoadColumn(5)]
public float AgeAtHire { get; set; }
[LoadColumn(6)]
public float HasKids { get; set; }
[LoadColumn(7)]
public float WithinMonthOfVesting { get; set; }
[LoadColumn(8)]
public float DeskDecorations { get; set; }
[LoadColumn(9)]
public float LongCommute { get; set; }
}
}