Esempio n. 1
0
 def GenerateModel(dictionary, id):
     demand = ProcessData.ProcessData(dictionary)
     Prediction.GenerateModel(dictionary, demand)
     latestPrediction = Prediction.GetPrediction(dictionary, demand)
     loadDict[id] = latestPrediction
     with open("savedPredictions.txt", "a+") as outfile:
         json.dump({"id": id, "predictions": latestPrediction}, outfile)
         outfile.write("\n")
     print("latestPrediction type: ", type(latestPrediction),
           "\n latestPrediction: ", latestPrediction)
     return "Model Generation completed."
Esempio n. 2
0
 def GetPrediction(dictionary):
     return Prediction.GetPrediction(dictionary)
Esempio n. 3
0
def TestML():
    try:
        assert (Prediction.GetPrediction("Bef Orchard Blvd-ML-1", 30.0, 10, 0))
    except:
        print("Test Machine Learning fail")