-
Notifications
You must be signed in to change notification settings - Fork 0
Add walker and hamming and tests for them #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
KubEF
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Честно говоря, это всё очень сильно пахнет нейросеточным кодом
| result = sum(probs) | ||
| if not(abs(result - 1.0) < 1e-6): | ||
| raise ValueError("Сумма вероятностей должна быть близка 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему "близка"? Она должна быть ему равна
| from collections import deque | ||
|
|
||
| class WalkersAlias: | ||
| def __init__(self, events_and_probs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Названия переменных очень странные. Вы вообще не используете принятую у нас терминологию: донор, рецепиент, барьер -- всего этого нет
| @@ -0,0 +1,66 @@ | |||
| def reducent_bits(n): | |||
| """ | |||
| Рассчитывает редуцентные биты p | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что такое "редуцентные" биты? Документация должна пояснять функцию. Почему возвращает число, а не список, если она рассчитывает биты?
ни в какую не хочет уолкер работать с рандомом