Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Last active March 10, 2022 01:24
Show Gist options
  • Save mdfarragher/ddb8c0591cdbf45a3f0afffd62b424a1 to your computer and use it in GitHub Desktop.
Save mdfarragher/ddb8c0591cdbf45a3f0afffd62b424a1 to your computer and use it in GitHub Desktop.
A C# code fragment of the MLNET taxi price prediction demo
/// <summary>
/// The TaxiTrip class represents a single taxi trip.
/// </summary>
public class TaxiTrip
{
[LoadColumn(0)] public string VendorId;
[LoadColumn(5)] public string RateCode;
[LoadColumn(3)] public float PassengerCount;
[LoadColumn(4)] public float TripDistance;
[LoadColumn(9)] public string PaymentType;
[LoadColumn(10)] public float FareAmount;
}
/// <summary>
/// The TaxiTripFarePrediction class represents a single far prediction.
/// </summary>
public class TaxiTripFarePrediction
{
[ColumnName("Score")] public float FareAmount;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment