Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save indraone01/1370cec10de0fd0e79edb213af95cd62 to your computer and use it in GitHub Desktop.
Save indraone01/1370cec10de0fd0e79edb213af95cd62 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