示例#1
0
def computeStandardDistance(totalCrimeCord,dictPointMean):
    resultDict=defaultdict(dict)
    for k,v in totalCrimeCord.items():
        d=map(lambda x: getDistance(x,dictPointMean[k] ),v)
        value=stat.sigmaFloat(d)
        resultDict[k]=value;    
    return resultDict 
示例#2
0
def computeRadiusDistance(meanPoint,listPoint):
    d=map(lambda x: getDistance(x,meanPoint),listPoint)
    valueMean=stat.meanFloat(d);
    valueSigma=stat.sigmaFloat(d)
        
    return valueMean +2*valueSigma;