One of the main unsolved problems of cosmology is how to maximize the
extraction of information from nonlinear data. If the data are nonlinear the
usual approach is to employ a sequence of statistics (N-point statistics,
counting statistics of clusters, density peaks or voids etc.), along with the
corresponding covariance matrices. However, this approach is computationally
prohibitive and has not been shown to be exhaustive in terms of information
content. Here we instead develop a Bayesian approach, expanding the likelihood
around the maximum posterior of linear modes, which we solve for using
optimization methods. By integrating out the modes using perturbative expansion
of the likelihood we construct an initial power spectrum estimator, which for a
fixed forward model contains all the cosmological information if the initial
modes are gaussian distributed. We develop a method to construct the window and
covariance matrix such that the estimator is explicitly unbiased and nearly
optimal. We then generalize the method to include the forward model parameters,
including cosmological and nuisance parameters, and primordial non-gaussianity.
We apply the method in the simplified context of nonlinear structure formation,
using either simplified 2-LPT dynamics or N-body simulations as the nonlinear
mapping between linear and nonlinear density, and 2-LPT dynamics in the
optimization steps used to reconstruct the initial density modes. We
demonstrate that the method gives an unbiased estimator of the initial power
spectrum, providing among other a near optimal reconstruction of linear
baryonic acoustic oscillations.Comment: 46 pages, 9 figures; updated figure 9 to the correct versio