Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public IActionResult Predict(
float season,
float year,
float month,
DateTime hour,
bool holiday,
float weekday,
float weather,
float temperature,
float normalizedTemperature,
float humidity,
float windspeed)
var justHour = hour.Hour;
var input = new BikeSharingDemandSample()
Season = season,
Year = year,
Month = month,
Hour = justHour,
Holiday = holiday,
Weekday = weekday,
Weather = weather,
Temperature = temperature,
NormalizedTemperature = normalizedTemperature,
Humidity = humidity,
Windspeed = windspeed,
Count = 0
var prediction = _machineLearningModel.Predict(input);
ViewData.Add("prediction", prediction.PredictedCount);
return View();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment