如何以编程方式表示状态变化 - 捕获球员替换
我正在尝试创建一个数据集来训练体育应用的神经网络。我试图捕捉球员替换对球队得分的影响。我有几组替换(琼斯换史密斯)(史密斯换戴维斯)等,我试图用一个唯一的数字来表示。例如,每次我的数据集包含琼斯替换史密斯时,函数/程序/哈希都会产生相同的数字。
我研究了哈希代码(MDA、Sha),但这些似乎确实是正确的方法。我对这个有点难住了。如果有人遇到过类似的情况或有一些编程技巧,他们愿意分享,我将不胜感激。谢谢。
I'm trying to create a data set for training a neural network for sports application. I'm trying to capture the impact player substitutions on points scored by a team. I have sets of substitutions (Jones for Smith) (Smith for Davis) etc. that I'm trying to represent with a unique number. For example every time my data set included a Jones for Smith substitution the function/program/hash would produce the same number.
I looked into Hash Codes (MDA, Sha), but these do seem to be the right way to go. I'm sort of stumped on this one. If anyone has come across a similar situation or has some programming wizardry they would care to share I would appreciate it. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以按照替换、替换、下一个替换、下一个替换等方式构建主键字符串,例如“Jones,Smith,Smith,Davis”。该字符串的 MD5 哈希虽然不能保证唯一,但对于您的目的来说可能足够唯一。
You could build a string of the primary keys, along the lines of substited,substituted for, next substituted, next substituted for, etc. e.g. "Jones,Smith,Smith,Davis". An MD5 hash of this string, whilst not guaranteed to be unique, is probably going to be unique enough for your purposes.