Created
December 20, 2022 19:39
-
-
Save galenseilis/73c5e86d752c8292e2b442ed32fb2867 to your computer and use it in GitHub Desktop.
Statistical rethinking with Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tensorflow | |
import tensorflow as tf | |
x = tf.range(1, 3, dtype='float32') | |
x *= 10 | |
x = tf.math.log(x) | |
x = tf.reduce_sum(x) | |
x = tf.math.exp(x) | |
# PyMC | |
import numpy as np | |
x = np.arange(1, 3) | |
x *= 10 | |
x = np.log(x) | |
x = np.sum(x) | |
x = np.exp(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment