-
-
Save mdfarragher/c18ce57a356e96c6982b15ea12bfa29a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a prediction engine for one single prediction | |
let engine = context.Model.CreatePredictionEngine model | |
let taxiTripSample = { | |
VendorId = "VTS" | |
RateCode = "1" | |
PassengerCount = 1.0f | |
TripDistance = 3.75f | |
PaymentType = "CRD" | |
FareAmount = 0.0f // To predict. Actual/Observed = 15.5 | |
} | |
// make the prediction | |
let prediction = taxiTripSample |> engine.Predict | |
// show the prediction | |
printfn "\r" | |
printfn "Single prediction:" | |
printfn " Predicted fare: %f" prediction.FareAmount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment