Commit 38555af0 authored by Chris's avatar Chris
Browse files

typo fixes

parent 30cdc843
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ def makePrediction(message):
    print(pred_y)
    """
    
    return str(pred_y.count(1)) + ' out of 4 modes predict this message to be spam.'
    return str(pred_y.count(1)) + ' out of 4 models predict this message to be spam.'


# declaring, training, fitting each algorithm
@@ -227,3 +227,12 @@ def partialFitNewData(message, label):

def switchCurrentAlgorithm():
    pass

def getPerformanceMetrics():
    if len(X) == 0:
        preprocessing()
    
    if tree == None:
        loadModels()

    
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ def correctPrediction():
    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
    return response

# TODO make this get the actual ranking of algorithms
@app.route('/getAlgorithms', methods=["GET"])
@@ -56,6 +56,8 @@ def getTopAlgorithms():
    recall = ["1", "2", "3", "4", "5"]
    accuracy = ["1", "2", "3", "4", "5"]
    
    name, f1, precision, recall, accuracy = ml.getPerformanceMetrics()

    val = {
        "name": name,
        "f1": f1,