Commit 0a44bb2b authored by Chris's avatar Chris
Browse files

preparing us to allow for partial fitting

parent 4b0b717c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -221,7 +221,8 @@ def makePrediction(message):
def mlinit():
    pass

def partialFitNewData():
# partial fit the new prediction data to each algorithm
def partialFitNewData(message, label):
    pass

def switchCurrentAlgorithm():
+3 −2
Original line number Diff line number Diff line
@@ -41,9 +41,10 @@ def predict():
@app.route('/correctPrediction', methods=["POST"])
def correctPrediction():
    json = request.get_json()
    # message = json["message"]
    # label = json["label"]
    message = json["message"]
    label = json["label"]
    print(json)
    response = {'response': ml.partialFitNewData(message, label)}
    return json # just for debugging TODO integrate the code with ml.py to get a response

# TODO make this get the actual ranking of algorithms