public ActionResult Consumir(String dni) { var a = s.getByDNI(dni); Input1 tmp = new Input1(); tmp.age = a.Age.ToString(); tmp.capitalgain = a.Capital_gain.ToString(); tmp.capitaloss = a.Capital_loss.ToString(); tmp.education = a.Education.ToString(); tmp.educationum = a.Education_num.ToString(); tmp.fnlwgt = a.Fnlwgt.ToString(); tmp.hoursperweek = a.Hours_per_week.ToString(); tmp.maritalstatus = a.Relationship.ToString(); tmp.nativecountry = a.Id_Country.ToString(); tmp.occupation = a.Occupation.ToString(); tmp.race = a.Race.ToString(); tmp.relationship = a.Relationship.ToString(); tmp.sex = a.Id_Sex.ToString(); tmp.workclass = a.Workclass.ToString(); var inputdatatmp = new InputDataMLS(tmp); Output1 output1 = new PredictML().ConsumeMLS(inputdatatmp).Result; return(RedirectToAction("Index", output1)); //return View(); }
public void DoTestCall() { var t = new PredictML(); var numberOfCrimesPerYear = t.GetCrimeNumberByCoordAndYear(51.20304, 12.134566, 2016); Assert.IsTrue(numberOfCrimesPerYear >= 0); }