%feature("docstring") OT::MethodOfMomentsFactory
"Estimation by method of moments.

Implements generic estimation by method of moments.

Available constructor:
    MethodOfMomentsFactory(*distribution*)

Parameters
----------
distribution : :class:`~openturns.Distribution`
    The distribution defining the parametric model to be adjusted to data.

Notes
-----
The underlying optimization problem seeks to minimize the sum of slacks between the
centered moments of the sample and the centered moments of the parametric model:

.. math::

    \Delta = \argmin_{\vect{\theta} \in \Rset^K} [ |\mu_1-m_1|/\sigma ]^2 + \sum_{i=2}^K[ (|\mu_i|^{1/i}-|m_i|^{1/i})/\sigma ]^2

with :math:`K` the number of parameters of the distribution, :math:`\mu_i` and
:math:`m_i` the centered moments of the sample and the parametric model.

See also
--------
DistributionFactory

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal(0.9, 1.7)
>>> sample = distribution.getSample(10)
>>> factory = ot.MethodOfMomentsFactory(ot.Normal())
>>> inf_distribution = factory.build(sample)"

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::setOptimizationAlgorithm
"Accessor to the solver.

Parameters
----------
solver : :class:`~openturns.OptimizationAlgorithm`
    The solver used for numerical optimization of the moments."

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::getOptimizationAlgorithm
"Accessor to the solver.

Returns
-------
solver : :class:`~openturns.OptimizationAlgorithm`
    The solver used for numerical optimization of the moments."

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::setOptimizationProblem
"Accessor to the problem.

Parameters
----------
problem : :class:`~openturns.OptimizationProblem`
    The problem used for numerical optimization of the moments."

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::getOptimizationProblem
"Accessor to the problem.

Returns
-------
problem : :class:`~openturns.OptimizationProblem`
    The problem used for numerical optimization of the moments."

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::setKnownParameter
"Accessor to the known parameters.

Parameters
----------
values : sequence of float
    Values of fixed parameters.
indices : sequence of int
    Indices of fixed parameters.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Beta(2.3, 4.5, -1.0, 1.0)
>>> sample = distribution.getSample(10)
>>> factory = ot.MethodOfMomentsFactory(ot.Beta())
>>> # set (a,b) out of (r, t, a, b)
>>> factory.setKnownParameter([-1.0, 1.0], [2, 3])
>>> inf_distribution = factory.build(sample)"

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::getKnownParameterValues
"Accessor to the known parameters indices.

Returns
-------
values : :class:`~openturns.Point`
    Values of fixed parameters."

// ---------------------------------------------------------------------

%feature("docstring") OT::MethodOfMomentsFactory::getKnownParameterIndices
"Accessor to the known parameters indices.

Returns
-------
indices : :class:`~openturns.Indices`
    Indices of fixed parameters."
