We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The "Privacy Algorithm" implementation in Chapter 2 can perhaps be improved using a theano switch expression:
val = pm.math.switch(first_coin_flips, true_answers, second_coin_flips)
It is currently implemented as:
val = first_coin_flips*true_answers + (1 - first_coin_flips)*second_coin_flips
A python conditional expression unfortunately doesn't do the trick:
val = true_answers if first_coin_flips else second_coin_flips
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The "Privacy Algorithm" implementation in Chapter 2 can perhaps be improved using a theano switch expression:
It is currently implemented as:
A python conditional expression unfortunately doesn't do the trick:
The text was updated successfully, but these errors were encountered: