Reputation: 586
I am following this tutorial from Microsoft docs for linear regression using ML.Net. I am not able to determine why exactly do we need a class with a score column with the specific column name as 'Score'. I tried changing the column name from Score to something else which results in the following exception:
public class TaxiTrip {
// All the columns inclusive of the label column
[LoadColumn(0)]
public string VendorId;
[LoadColumn(1)]
public string RateCode;
[LoadColumn(2)]
public float PassengerCount;
[LoadColumn(3)]
public float TripTime;
[LoadColumn(4)]
public float TripDistance;
[LoadColumn(5)]
public string PaymentType;
[LoadColumn(6)]
public float FareAmount;
}
public class TaxiTripFarePrediction {
[ColumnName("PredictionScore")]
public float FareAmount;
}
Also as I never specified the class TaxiTripFarePrediction
anywhere either in the training function or in the Evaluate function as shown above how does the model work when I specify the column name as Score
instead of something else?
The similar scenario was seen for the Label
column.
Upvotes: 1
Views: 1430
Reputation: 462
The TaxiTripFarePrediction
class represents predicted results. It has a single float field, FareAmount
, with a Score
attribute applied. In case of the regression task, the Score column contains predicted label values.
I'm new in ML and I think Score and Features cannot change the properties. You can refer this link: https://learn.microsoft.com/en-us/dotnet/machine-learning/how-does-mldotnet-work#mlnet-architecture
You can see this image. Score and Features are generated by algorithms
Upvotes: 1