sparse data clustering with infinite-norm
def distance(X,v,tol): l = abs(X-v).apply(lambda x:sorted(x),axis=1) l = l.iloc[:,int(np.floor(X.shape[1]*tol))] return l def cluster_l1(df,threshold=0.05,tol=0.9,iternum=20,rnum
原创
2016-11-30 16:32:56 ·
234 阅读 ·
0 评论