  We present a detailed study of the applications of two stochastic approaches,
stochastic optimization method (SOM) and stochastic analytical inference (SAI),
to extract spectral functions from Euclidean correlation functions. SOM has the
advantage that it does not require prior information. On the other hand, SAI is
a more generalized method based on Bayesian inference. Under mean field
approximation SAI reduces to the often-used maximum entropy method (MEM), and
for a specific choice of the prior SAI becomes equivalent to SOM. To test the
applicability of these two stochastic methods to lattice QCD, firstly, we apply
these methods to various reasonably chosen model correlation functions, and
present detailed comparisons of the reconstructed spectral functions obtained
from SOM, SAI and MEM. Next, we present similar studies for charmonia
correlation functions obtained from lattice QCD computations using
clover-improved Wilson fermions on large, fine, isotropic lattices at $0.75$
and $1.5T_c$, $T_c$ being the deconfinement transition temperature of a pure
gluon plasma. We find that SAI and SOM give consistent results to MEM at these
two temperatures.
