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
def computeRadiusDistance(meanPoint,listPoint): d=map(lambda x: getDistance(x,meanPoint),listPoint) valueMean=stat.meanFloat(d); valueSigma=stat.sigmaFloat(d) return valueMean +2*valueSigma;