I'm learning Bayesian Models but i still have some issues with the training of the parameters. These are my two questions :
1) Recall the Bayesian formula : $$p(\theta|X) = \frac{ p(X|\theta) \; p(\theta) }{p(X)}$$ It seems that we learn the hyper parameters of our model by maximizing the likelihood. In the case of a Gaussian Process for example, we modify the parameter of the kernel by maximizing the likelihood which is differentiable with respect to theta, so we can use gradient based methods... (see 5.4.1 in the Gaussian Process Book)
But my question is : if we maximize only the likelihood, we are back to a frequentist approach no ? i thought that the whole thing with Bayesian Methods was to consider both the likelihood and the prior ... why not choosing the parameters by maximizing the Maximum a Posteriori ?!
2) How do we modify the parameters of a Bayesian Model if the likelihood is not differentiable with respect to the parameters. In other words, when we use an MCMC to approximate the posterior distribution, we have no way to get the derivative of the likelihood because we have only samples that follow the target distribution... In this case how do we learn the optimal parameters ?
In other words, how is it possible to get the derivative of the likelihood (or the MAP depending the answer of the first question) with respect to some parameters if we only have samples that follow the posterior distribution ?
In a bayesian neural network for example, we have to modify the mean and the standard deviation of all the weight distributions. This paper ( Weight Uncertainty in Neural Networks) presents a method with an approximation of the posterior distribution with a variationnal family. (Bayes by Backprop) In this case, indeed, we have an expression of the variationnal free energy that we can differentiate with respect to some parameters. But in the case of a Monte Carlo, how do we modify the weights parameters ?
Thank you so much for your help !