def predict_proba(self, header_unfiltered, csv_data_unfiltered):
    header = []
    csv_data = []
    for (i, dat) in enumerate(csv_data_unfiltered):
        if (dat == 0):
            continue
        csv_data.append(dat)
        header.append(header_unfiltered[i])
    locations = self.get_locations()
    num_locations = len(locations)
    NA = (1 / num_locations)
    NnotA = (1 - NA)
    Ps = {}
    for (i, mac) in enumerate(header):
        val = int(round(float(csv_data[i])))
        for location in locations:
            if (location not in Ps):
                Ps[location] = []
            PA = self.prob_mac_given_loc(mac, val, location, True)
            PnotA = self.prob_mac_given_loc(mac, val, location, False)
            P = ((PA * NA) / ((PA * NA) + (PnotA * NnotA)))
            Ps[location].append(math.log(P))
    P_sum = 0
    for location in Ps:
        P_sum += math.exp(sum(Ps[location]))
    d = {}
    for location in Ps:
        d[location] = (math.exp(sum(Ps[location])) / P_sum)
    return [(k, d[k]) for k in sorted(d, key=d.get, reverse=True)]
def predict_proba(self, header_unfiltered, csv_data_unfiltered):
    header = []
    csv_data = []
    for (i, dat) in enumerate(csv_data_unfiltered):
        if (dat == 0):
            continue
        csv_data.append(dat)
        header.append(header_unfiltered[i])
    locations = self.get_locations()
    num_locations = len(locations)
    NA = (1 / num_locations)
    NnotA = (1 - NA)
    Ps = {}
    for (i, mac) in enumerate(header):
        val = int(round(float(csv_data[i])))
        for location in locations:
            if (location not in Ps):
                Ps[location] = []
            PA = self.prob_mac_given_loc(mac, val, location, True)
            PnotA = self.prob_mac_given_loc(mac, val, location, False)
            P = ((PA * NA) / ((PA * NA) + (PnotA * NnotA)))
            Ps[location].append(math.log(P))
    P_sum = 0
    for location in Ps:
        P_sum += math.exp(sum(Ps[location]))
    d = {}
    for location in Ps:
        d[location] = (math.exp(sum(Ps[location])) / P_sum)
    return [(k, d[k]) for k in sorted(d, key=d.get, reverse=True)]