Skip to content

Conversation

@zqqcee
Copy link

@zqqcee zqqcee commented Oct 20, 2023

算法在大规模数据时跑的结果不同,可能是由于label propagation算法对输入数据太敏感,目前正在排查中

}

/**
* 标签传播算法
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否能统一为英文注释~

* ...
* }
*/
const neighbors: { [key: ID]: { [key: ID]: number } } = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为新版的 ID 支持数字,这里使用对象,key 可能出现无法区分 0 和 "0" 的情况。可以测试看看会不会有这个问题

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实是会存在这个问题,我修改一下

return Math.sqrt(res);
}

export const uniqueId = (index: number = 0) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

咦我记得有 uniqueId 这个工具方法呀,在 @antv/util 里面

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okok 我改一下,我看之前的是自己写的就直接挪过来了

return Math.sqrt(res);
}

export const uniqueId = (index: number = 0) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这段是不是可以删掉了

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的问题😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants