Skip to content

Commit e16bb56

Browse files
committed
updating the taxi far tutorial
1 parent 7463f17 commit e16bb56

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/machine-learning/tutorials/taxi-fare.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,25 @@ Next, create classes for the input data and the predictions:
105105
using Microsoft.ML.Runtime.Api;
106106
```
107107

108-
Add two classes into this file. `TaxiTrip`, the input data set class, has definitions for each of the columns discovered above and a `Label` `ColumnName` attribute. Add the following code to the file:
108+
Add two classes into this file. `TaxiTrip`, the input data set class, has definitions for each of the columns discovered above and a `Label` attribute for the fare_amount column that you are predicting. Add the following code to the file:
109109

110110
```csharp
111111
public class TaxiTrip
112112
{
113+
[Column(ordinal: "0")]
113114
public string vendor_id;
115+
[Column(ordinal: "1")]
114116
public string rate_code;
117+
[Column(ordinal: "2")]
115118
public float passenger_count;
119+
[Column(ordinal: "3")]
116120
public float trip_time_in_secs;
121+
[Column(ordinal: "4")]
117122
public float trip_distance;
123+
[Column(ordinal: "5")]
118124
public string payment_type;
125+
[Column(ordinal: "6", "Label")]
119126
public float fare_amount;
120-
121-
[ColumnName("Label")]
122-
public float Label;
123127
}
124128
```
125129

0 commit comments

Comments
 (0)