commons-math/xdocs/userguide/estimation.xml

115 lines
5.9 KiB
XML

<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
<!-- $Revision: 480435 $ $Date: 2006-11-29 08:06:35 +0100 (mer., 29 nov. 2006) $ -->
<document url="estimation.html">
<properties>
<title>The Commons Math User Guide - Parametric Estimation</title>
</properties>
<body>
<section name="12 Parametric Estimation">
<subsection name="12.1 Overview" href="overview">
<p>
The estimation package provides classes to fit some non-linear model
to available observations depending on it. These problems are commonly
called estimation problems.
</p>
<p>
The estimation problems considered here are parametric problems where
a user-provided model depends on initially unknown scalar parameters and
several measurements made on values that depend on the model are available.
As examples, one can consider the center and radius of a circle given
points approximately lying on a ring, or a satellite orbit given range,
range-rate and angular measurements from various ground stations.
</p>
<p>
One important class of estimation problems is weighted least squares problems.
They basically consist in finding the values for some parameters p<sub>k</sub>
such that a cost function J =
<!-- TODO: get entity for summation imported -->
sum(w<sub>i</sub> r<sub>i</sub><sup>2</sup>)
is minimized. The various r<sub>i</sub> terms represent the deviation
r<sub>i</sub> = mes<sub>i</sub> - mod<sub>i</sub> between the measurements and
the parameterized models. The w<sub>i</sub> factors are the measurements weights,
they are often chosen either all equal to 1.0 or proportional to the inverse of
the variance of the measurement type. The solver adjusts the values of the
estimated parameters p<sub>k</sub> which are not bound (i.e. the free parameters).
It does not touch the parameters which have been put in a bound state by the user.
</p>
<p>
The aim of this package is similar to the aim of the optimization package, but the
algorithms are entirely differents as:
<ul>
<li>
they need the partial derivatives of the measurements
with respect to the free parameters
</li>
<li>
they are residuals based instead of generic cost functions based
</li>
</ul>
</p>
</subsection>
<subsection name="12.2 Models" href="models">
The <a href="../apidocs/org/apache/commons/math/estimation/EstimationProblem.html">
org.apache.commons.math.estimation.EstimationProblem</a> interface is a very
simple container packing together parameters and measurements.
</subsection>
<subsection name="12.3 Parameters" href="parameters">
<p>
The <a href="../apidocs/org/apache/commons/math/estimation/EstimatedParameter.html">
org.apache.commons.math.estimation.EstimatedParameter</a> class to represent each
estimated parameter. The parameters are set up with a guessed value which will be
adjusted by the solver until a best fit is achieved. It is possible to change which
parameters are modified and which are preserved thanks to a bound property. Such
settings are often needed by expert users to handle contingency cases with very
low observability.
</p>
</subsection>
<subsection name="12.4 Measurements" href="measurements">
<p>
The user extends the <a href="../apidocs/org/apache/commons/math/estimation/WeightedMeasurement.html">
org.apache.commons.math.estimation.WeightedMeasurement</a> abstract class to define its
own measurements. Each measurement types should have its own implementing class, for
example in the satellite example above , the user should define three classes, one
for range measurements, one for range-rates measurements and one for angular measurements.
Each measurement would correspond to an instance of the appropriate class, set up with
the date, a reference to the ground station, the weight and the measured value.
</p>
</subsection>
<subsection name="12.5 Solvers" href="solvers">
<p>
The package provides two common <a href="../apidocs/org/apache/commons/math/estimation/Estimator.html">
org.apache.commons.math.estimation.Estimator</a> implementations to solve weighted
least squares problems. The first one is based on the
<a href="../apidocs/org/apache/commons/math/estimation/GaussNewtonEstimator.html">Gauss-Newton</a> method.
The second one is based on the
<a href="../apidocs/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.html">Levenberg-Marquardt</a>
method. The first one is best suited when a good approximation of the parameters is known while the second one
is more robust and can handle starting points far from the solution.
</p>
</subsection>
</section>
</body>
</document>