Skip to content

Commit

Permalink
Update userguide.
Browse files Browse the repository at this point in the history
Some links are still broken (due to the refactoring).
  • Loading branch information
Gilles Sadowski committed Apr 5, 2024
1 parent a368d71 commit ffcdf39
Show file tree
Hide file tree
Showing 15 changed files with 298 additions and 298 deletions.
142 changes: 71 additions & 71 deletions src/site/xdoc/userguide/analysis.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/site/xdoc/userguide/distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
Commons Math provides
<ul>
<li>
an <a href="../apidocs/org/apache/commons/math4/legacy/distribution/EnumeratedDistribution.html">
an <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/distribution/EnumeratedDistribution.html">
EnumeratedDistribution</a> class that represents discrete distributions of a finite,
enumerated set of values.
</li>
<li>
a <a href="../apidocs/org/apache/commons/math4/legacy/distribution/MultiVariateNormalDistribution.html">
a <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/distribution/MultiVariateNormalDistribution.html">
MultivariateNormalDistribution</a> interface that represents multivariate Gaussian
distributions.
</li>
Expand Down
14 changes: 7 additions & 7 deletions src/site/xdoc/userguide/exceptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@
<li>
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html">
<code>IllegalArgumentException</code></a>:
A <a href="../apidocs/org/apache/commons/math4/exception/MathIllegalArgumentException.html">
A <a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/MathIllegalArgumentException.html">
<code>MathIllegalArgumentException</code></a> is thrown when some input
parameter fails a precondition check.
</li>
<li>
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html">
<code>IllegalStateException</code></a>:
A <a href="../apidocs/org/apache/commons/math4/exception/MathIllegalStateException.html">
A <a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/MathIllegalStateException.html">
<code>MathIllegalStateException</code></a> is thrown when some inconsistency
has been detected.
</li>
<li>
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/MathArithmeticException.html">
<code>ArithmeticException</code></a>:
A <a href="../apidocs/org/apache/commons/math4/exception/MathArithmeticException.html">
A <a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/MathArithmeticException.html">
<code>MathArithmeticException</code></a> is thrown when conditions such as
"division by zero" or "overflow" are encountered.
</li>
<li>
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/MathUnsupportedOperationException.html">
<code>UnsupportedOperationException</code></a>:
A <a href="../apidocs/org/apache/commons/math4/exception/MathUnsupportedOperationException.html">
A <a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/MathUnsupportedOperationException.html">
<code>MathUnsupportedOperationException</code></a> indicates that a feature
is missing or does not make sense in the given context.
</li>
Expand All @@ -101,11 +101,11 @@
<li>Exception "context"
<p>
Every exception generated by Commons Math implements the
<a href="../apidocs/org/apache/commons/math4/exception/util/ExceptionContextProvider.html">
<a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/util/ExceptionContextProvider.html">
ExceptionContextProvider</a> interface. A call to the
<a href="../apidocs/org/apache/commons/math4/exception/util/ExceptionContextProvider.html#getContext()">
<a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/util/ExceptionContextProvider.html#getContext()">
getContext</a> method will return the
<a href="../apidocs/org/apache/commons/math4/exception/util/ExceptionContext.html">
<a href="../commons-math-legacy-exception/apidocs/org/apache/commons/math4/legacy/exception/util/ExceptionContext.html">
ExceptionContext</a> instance stored in the exception, which the
user can further customize by adding messages and/or any object.
</p>
Expand Down
6 changes: 3 additions & 3 deletions src/site/xdoc/userguide/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
</subsection>
<subsection name="17.2 Kalman Filter" href="kalman">
<p>
<a href="../apidocs/org/apache/commons/math4/filter/KalmanFilter.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/filter/KalmanFilter.html">
KalmanFilter</a> provides a discrete-time filter to estimate
a stochastic linear process.</p>

<p>A Kalman filter is initialized with a <a href="../apidocs/org/apache/commons/math4/filter/ProcessModel.html">
ProcessModel</a> and a <a href="../apidocs/org/apache/commons/math4/filter/MeasurementModel.html">
<p>A Kalman filter is initialized with a <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/filter/ProcessModel.html">
ProcessModel</a> and a <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/filter/MeasurementModel.html">
MeasurementModel</a>, which contain the corresponding transformation and noise covariance matrices.
The parameter names used in the respective models correspond to the following names commonly used
in the mathematical literature:
Expand Down
26 changes: 13 additions & 13 deletions src/site/xdoc/userguide/fitting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
appropriate class,
</li>
<li>
call the <a href="../apidocs/org/apache/commons/math4/fitting/AbstractCurveFitter">fit</a>
with a <code>Collection</code> of <a href="../apidocs/org/apache/commons/math4/fitting/WeightedObservedPoint.html">
call the <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/AbstractCurveFitter">fit</a>
with a <code>Collection</code> of <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/WeightedObservedPoint.html">
observed data points</a> as argument, which will return an array with the parameters that
best fit the given data points.
</li>
</ul>

The list of observed data points to be passed to <code>fit</code> can be built by incrementally
adding instances to an instance of <a href="../apidocs/org/apache/commons/math4/fitting/WeightedObservedPoints.html">WeightedObservedPoints</a>,
adding instances to an instance of <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/WeightedObservedPoints.html">WeightedObservedPoints</a>,
and then retrieve the list of <code>WeightedObservedPoint</code> by calling the <code>toList</code>
method on that container.
A weight can be associated with each observed point; it allows to take into account uncertainty
Expand All @@ -81,25 +81,25 @@
Fitting of specific functions are provided through the following classes:
<ul>
<li>
<a href="../apidocs/org/apache/commons/math4/fitting/PolynomialCurveFitter.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/PolynomialCurveFitter.html">
PolynomialFitter</a> fits a
<a href="../apidocs/org/apache/commons/math4/analysis/polynomials/PolynomialFunction.Parametric.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/analysis/polynomials/PolynomialFunction.Parametric.html">
polynomial</a> function.
</li>
<li>
<a href="../apidocs/org/apache/commons/math4/fitting/HarmonicCurveFitter.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/HarmonicCurveFitter.html">
HarmonicFitter</a> fits a
<a href="../apidocs/org/apache/commons/math4/analysis/function/HarmonicOscillator.Parametric.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/analysis/function/HarmonicOscillator.Parametric.html">
harmonic</a> function.
An instance of the inner class <a href="../apidocs/org/apache/commons/math4/fitting/HarmonicCurveFitter.ParameterGuesser.html">
An instance of the inner class <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/HarmonicCurveFitter.ParameterGuesser.html">
ParameterGuesser</a> can be used to retrieve initial values for the fitting procedure.
</li>
<li>
<a href="../apidocs/org/apache/commons/math4/fitting/GaussianCurveFitter.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/GaussianCurveFitter.html">
GaussianFitter</a> fits a
<a href="../apidocs/org/apache/commons/math4/analysis/function/Gaussian.Parametric.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/analysis/function/Gaussian.Parametric.html">
Gaussian</a> function.
An instance of the inner class <a href="../apidocs/org/apache/commons/math4/fitting/GaussianCurveFitter.ParameterGuesser.html">
An instance of the inner class <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/GaussianCurveFitter.ParameterGuesser.html">
ParameterGuesser</a> can be used to retrieve initial values for the fitting procedure.
</li>
</ul>
Expand Down Expand Up @@ -129,11 +129,11 @@ final double[] coeff = fitter.fit(obs.toList());

<subsection name="13.3 General Case" href="general">
<p>
The <a href="../apidocs/org/apache/commons/math4/fitting/AbstractCurveFitter.html">
The <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/fitting/AbstractCurveFitter.html">
AbstractCurveFitter</a> class provides the basic functionality for implementing other
curve fitting classes.
Users must provide their own implementation of the curve template as a class that implements
the <a href="../apidocs/org/apache/commons/math4/analysis/ParametricUnivariateFunction.html">
the <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/analysis/ParametricUnivariateFunction.html">
ParametricUnivariateFunction</a> interface.
</p>
</subsection>
Expand Down
28 changes: 14 additions & 14 deletions src/site/xdoc/userguide/genetics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
</subsection>
<subsection name="16.2 GA Framework">
<p>
<a href="../apidocs/org/apache/commons/math4/genetics/GeneticAlgorithm.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/GeneticAlgorithm.html">
GeneticAlgorithm</a> provides an execution framework for Genetic Algorithms (GA).
<a href="../apidocs/org/apache/commons/math4/genetics/Population.html">
Populations,</a> consisting of <a href="../apidocs/org/apache/commons/math4/genetics/Chromosome.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/Population.html">
Populations,</a> consisting of <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/Chromosome.html">
Chromosomes</a> are evolved by the <code>GeneticAlgorithm</code> until a
<a href="../apidocs/org/apache/commons/math4/genetics/StoppingCondition.html">
StoppingCondition</a> is reached. Evolution is determined by <a href="../apidocs/org/apache/commons/math4/genetics/SelectionPolicy.html">
SelectionPolicy</a>, <a href="../apidocs/org/apache/commons/math4/genetics/MutationPolicy.html">
MutationPolicy</a> and <a href="../apidocs/org/apache/commons/math4/genetics/Fitness.html">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/StoppingCondition.html">
StoppingCondition</a> is reached. Evolution is determined by <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/SelectionPolicy.html">
SelectionPolicy</a>, <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/MutationPolicy.html">
MutationPolicy</a> and <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/Fitness.html">
Fitness</a>.
</p>
<p>
Expand All @@ -62,10 +62,10 @@
<ul><li>Apply configured <code>SelectionPolicy</code> to select a pair of parents
from <code>current</code></li>
<li>With probability =
<a href="../apidocs/org/apache/commons/math4/genetics/GeneticAlgorithm.html#getCrossoverRate()">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/GeneticAlgorithm.html#getCrossoverRate()">
getCrossoverRate()</a>, apply configured <code>CrossoverPolicy</code> to parents</li>
<li>With probability =
<a href="../apidocs/org/apache/commons/math4/genetics/GeneticAlgorithm.html#getMutationRate()">
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/GeneticAlgorithm.html#getMutationRate()">
getMutationRate()</a>,
apply configured <code>MutationPolicy</code> to each of the offspring</li>
<li>Add offspring individually to nextGeneration,
Expand Down Expand Up @@ -104,27 +104,27 @@ Chromosome bestFinal = finalPopulation.getFittestChromosome();
<table>
<tr><th>Parameter</th><th>value in example</th><th>meaning</th></tr>
<tr><td>crossoverPolicy</td>
<td><a href="../apidocs/org/apache/commons/math4/genetics/OnePointCrossover.html">OnePointCrossover</a></td>
<td><a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/OnePointCrossover.html">OnePointCrossover</a></td>
<td>A random crossover point is selected and the first part from each parent is copied to the corresponding
child, and the second parts are copied crosswise.</td></tr>
<tr><td>crossoverRate</td>
<td>1</td>
<td>Always apply crossover</td></tr>
<tr><td>mutationPolicy</td>
<td><a href="../apidocs/org/apache/commons/math4/genetics/RandomKeyMutation.html">RandomKeyMutation</a></td>
<td><a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/RandomKeyMutation.html">RandomKeyMutation</a></td>
<td>Changes a randomly chosen element of the array representation to a random value uniformly distributed in [0,1].</td></tr>
<tr><td>mutationRate</td>
<td>.1</td>
<td>Apply mutation with probability 0.1 - that is, 10% of the time.</td></tr>
<tr><td>selectionPolicy</td>
<td><a href="../apidocs/org/apache/commons/math4/genetics/TournamentSelection.html">TournamentSelection</a></td>
<td><a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/TournamentSelection.html">TournamentSelection</a></td>
<td>Each of the two selected chromosomes is selected based on an n-ary tournament -- this is done by drawing
n random chromosomes without replacement from the population, and then selecting the fittest chromosome among them.</td></tr>
</table><br/>
The algorithm starts with an <code>initial</code> population of <code>Chromosomes.</code> and executes until
the specified <a href="../apidocs/org/apache/commons/math4/genetics/StoppingCondition.html">StoppingCondition</a>
the specified <a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/StoppingCondition.html">StoppingCondition</a>
is reached. In the example above, a
<a href="../apidocs/org/apache/commons/math4/genetics/FixedGenerationCount.html">FixedGenerationCount</a>
<a href="../commons-math-docs/apidocs/org/apache/commons/math4/legacy/genetics/FixedGenerationCount.html">FixedGenerationCount</a>
stopping condition is used, which means the algorithm proceeds through a fixed number of generations.
</p>
</subsection>
Expand Down
Loading

0 comments on commit ffcdf39

Please sign in to comment.