private Dictionary <uint, FileTypes> GetClusterToMap(PredictionEngineBase <FileData, FileTypePrediction> predictionEngine) { var map = new Dictionary <uint, FileTypes>(); var fileTypes = Enum.GetValues(typeof(FileTypes)).Cast <FileTypes>(); foreach (var fileType in fileTypes) { var fileData = new FileData(fileType); var prediction = predictionEngine.Predict(fileData); map.Add(prediction.PredictedClusterId, fileType); } return(map); }
private string GenerateOutcome(PredictionEngineBase <RawInput, Prediction> pe) { return(pe.Predict(new RawInput { Game = 0, Quarterback = "Josh Allen", Location = "Home", NumberOfPointsScored = 17, TopReceiver = "Robert Foster", TopRunner = "Josh Allen", NumberOfSacks = 0, NumberOfDefensiveTurnovers = 0, MinutesPossession = 0, Outcome = "WHO KNOWS?" }).Outcome); }
public void TestModel(string quarterback, string location, float numberOfPointsScored, string topReceiver, string topRunner, string expectedOutcome) { var outcome = predictor.Predict(new RawInput { Game = 0, Quarterback = quarterback, Location = location, NumberOfPointsScored = numberOfPointsScored, TopReceiver = topReceiver, TopRunner = topRunner, NumberOfSacks = 0, NumberOfDefensiveTurnovers = 0, MinutesPossession = 0, Outcome = "WHO KNOWS?" }); Assert.AreEqual(expectedOutcome, outcome.Outcome); }
private static float GetPrediction(PredictionEngineBase <EmployeeDto, SalaryPrediction> predictionEngine, Employee employee) { return(predictionEngine.Predict(new EmployeeDto(employee)).Salary); }