def predictkNNLabelsReg(closest_neighbors, y_train): 
    """predictKNNLabelsReg is a function that calculates the predicted label
    with the regression method. It uses the closest_neighbors, which consists of all the
    indices of the nearest neighbors"""
    total = 0;
    for i in range(len(closest_neighbors)):
        total = total + y_train[closest_neighbors[i]][0];
    LabelPrediction = total/len(closest_neighbors)
    return LabelPrediction