长度不同的元素列表之间的相似性演算
我需要生成一个与python不同长度(显示矩阵相似性以外的相似性)的元素列表之间的数据框或矩阵。
x=[(15,7),(12,7),(80,3),(10,8)] y=[(12,4),(11,9)] z=[(1,1),(16,7),(0,3),(10,5),(3,44)]
I need to generate a dataframe or matrix with distance between lists of tuples which are of different lengths (any distance showing similarity other than matrix similarity) with Python.
x=[(15,7),(12,7),(80,3),(10,8)] y=[(12,4),(11,9)] z=[(1,1),(16,7),(0,3),(10,5),(3,44)]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个列表似乎都是2D点的集合。计算每组质量的中心。计算每对质量中心之间的欧几里得距离,并将其放在方形矩阵中。
Each list can be seem as a set of 2D points. Calculate the center of mass of each set. Calculate the euclidian distance between every pair of center of mass and put it in a square matrix.