private void ApplyResults(List <CSVCarModel> orderedList) { // 1st Alg1stCarName.Text = orderedList[0].Name + " - Score: " + orderedList[0].Score; Alg1stPrice.Text = EvaluationHelper.USDToKunas(orderedList[0].Price) + " kn"; Alg1stHorsepower.Text = orderedList[0].Horsepower.ToString(); Alg1stLitres.Text = orderedList[0].Litres100km.ToString(); Alg1stFuelType.Text = orderedList[0].FuelType; Alg1stTransmission.Text = orderedList[0].Transmission; pictureBox1stAlg.ImageLocation = imageDir + orderedList[0].ID + ".png"; //2nd Alg2ndCarName.Text = orderedList[1].Name + " - Score: " + orderedList[1].Score; Alg2ndPrice.Text = EvaluationHelper.USDToKunas(orderedList[1].Price) + " kn"; Alg2ndHorsepower.Text = orderedList[1].Horsepower.ToString(); Alg2ndLitres.Text = orderedList[1].Litres100km.ToString(); Alg2ndFuelType.Text = orderedList[1].FuelType; Alg2ndTransmission.Text = orderedList[1].Transmission; pictureBox2ndAlg.ImageLocation = imageDir + orderedList[1].ID + ".png"; //3rd Alg3rdCarName.Text = orderedList[2].Name + " - Score: " + orderedList[2].Score; Alg3rdPrice.Text = EvaluationHelper.USDToKunas(orderedList[2].Price) + " kn"; Alg3rdHorsepower.Text = orderedList[2].Horsepower.ToString(); Alg3rdLitres.Text = orderedList[2].Litres100km.ToString(); Alg3rdFuelType.Text = orderedList[2].FuelType; Alg3rdTransmission.Text = orderedList[2].Transmission; pictureBox3rdAlg.ImageLocation = imageDir + orderedList[2].ID + ".png"; }
private void ApplyML1stResult(List <PredictionResultModel> resultList) { if (resultList.Count >= 1) { ML1stCarName.Text = resultList[0].Name + " - Confidence: " + resultList[0].Confidence + "%"; CSVCarModel exactCarModel = FindCarObjectPerName(resultList[0].Name); ML1stCarPrice.Text = EvaluationHelper.USDToKunas(exactCarModel.Price) + " kn"; ML1stHorsepower.Text = exactCarModel.Horsepower.ToString(); ML1stLitres.Text = exactCarModel.Litres100km.ToString(); ML1stFuelType.Text = exactCarModel.FuelType; ML1stTransmission.Text = exactCarModel.Transmission; pictureBox1stML.ImageLocation = imageDir + exactCarModel.ID + ".png"; } else { // Should never be executed ML1stCarName.Text = "Something went wrong with generating M rediction."; ML1stNumber.Visible = false; ML1stCarPrice.Visible = false; ML1stHorsepower.Visible = false; ML1stLitres.Visible = false; ML1stFuelType.Visible = false; ML1stTransmission.Visible = false; pictureBox1stML.Visible = false; } }
private void ApplyML3rdResult(List <PredictionResultModel> resultList) { if (resultList.Count >= 3) { ML3rdCarName.Text = resultList[2].Name + " - Confidence: " + resultList[2].Confidence + "%"; CSVCarModel exactCarModel = FindCarObjectPerName(resultList[2].Name); ML3rdPrice.Text = EvaluationHelper.USDToKunas(exactCarModel.Price) + " kn"; ML3rdHorsepower.Text = exactCarModel.Horsepower.ToString(); ML3rdLitres.Text = exactCarModel.Litres100km.ToString(); ML3rdFuelType.Text = exactCarModel.FuelType; ML3rdTransmission.Text = exactCarModel.Transmission; pictureBox3rdML.ImageLocation = imageDir + exactCarModel.ID + ".png"; } else { ML3rdCarName.Text = "3rd Prediction had too low confidence."; ML3rdNumber.Visible = false; ML3rdPrice.Visible = false; ML3rdHorsepower.Visible = false; ML3rdLitres.Visible = false; ML3rdFuelType.Visible = false; ML3rdTransmission.Visible = false; pictureBox3rdML.Visible = false; } }