Does tensorflow use automatic or symbolic gradients?

TF uses automatic differentiation and more specifically reverse-mode auto differentiation. There are 3 popular methods to calculate the derivative: Numerical differentiation Symbolic differentiation Automatic differentiation Numerical differentiation relies on the definition of the derivative: , where you put a very small h and evaluate function in two places. This is the most basic formula and … Read more

What is log-likelihood? [closed]

The only reason to use the log-likelihood instead of the plain old likelihood is mathematical convenience, because it lets you turn multiplication into addition. The plain old likelihood is P(parameters | data), i.e. assuming your data is fixed and you vary the parameters of your model. Maximizing this is one way to do parameter estimation … Read more

How do you calculate the axis-aligned bounding box of an ellipse?

You could try using the parametrized equations for an ellipse rotated at an arbitrary angle: x = h + a*cos(t)*cos(phi) – b*sin(t)*sin(phi) [1] y = k + b*sin(t)*cos(phi) + a*cos(t)*sin(phi) [2] …where ellipse has centre (h,k) semimajor axis a and semiminor axis b, and is rotated through angle phi. You can then differentiate and solve … Read more

Golang Round to Nearest 0.05

Foreword: I released this utility in github.com/icza/gox, see mathx.Round(). Go 1.10 has been released, and it adds a math.Round() function. This function rounds to the nearest integer (which is basically a “round to nearest 1.0” operation), and using that we can very easily construct a function that rounds to the unit of our choice: func … Read more