In Matlab, I can calculate the probability density function(PDF) of Gaussian distribution by using
x = [0.8147,0.9058,0.1270,0.9134,0.6324,0.0975,0.2785,0.5469,0.9575,0.9649]
y = normpdf(x,1.0,2.5)
output:
y = 0.1591 0.1595 0.1501 0.1595 0.1579 0.1495 0.1531 0.1570 0.1596 0.1596
Using tensorflow, I have tried with this
x = tf.variable([0.8147,0.9058,0.1270,0.9134,0.6324,0.0975,0.2785,0.5469,0.9575,0.9649],tf.float32)
y = tf.contrib.distributions.NormalWithSoftplusSigma.pdf(x)
I get an error TypeError: pdf missing 1 required positional argument
how to input the mu and sigma values to this distribution ? to get the similar output.
This function pdf
is updated as prob
:
dist = tf.contrib.distributions.Normal(1.0, 2.5)
y = dist.prob(x)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With