Skip to content

Commit 8286511

Browse files
committed
Mention AugLagrangianType constructor in the optimizer documentation, that allows to use a different datatype i.e. arma::fvec or coot::fvec.
1 parent 2779deb commit 8286511

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

doc/optimizers.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Active CMA-ES is a variant of the stochastic search algorithm
66
CMA-ES - Covariance Matrix Adaptation Evolution Strategy.
77
Active CMA-ES actively reduces the uncertainty in unfavourable directions by
8-
exploiting the information about bad mutations in the covariance matrix
9-
update step. This isn't for the purpose of accelerating progress, but
10-
instead for speeding up the adaptation of the covariance matrix (which, in
8+
exploiting the information about bad mutations in the covariance matrix
9+
update step. This isn't for the purpose of accelerating progress, but
10+
instead for speeding up the adaptation of the covariance matrix (which, in
1111
turn, will lead to faster progress).
1212

1313
#### Constructors
@@ -22,10 +22,10 @@ The _`SelectionPolicyType`_ template parameter refers to the strategy used to
2222
compute the (approximate) objective function. The `FullSelection` and
2323
`RandomSelection` classes are available for use; custom behavior can be achieved
2424
by implementing a class with the same method signatures.
25-
The _`TransformationPolicyType`_ template parameter refers to transformation
26-
strategy used to map decision variables to the desired domain during fitness
27-
evaluation and optimization termination. The `EmptyTransformation` and
28-
`BoundaryBoxConstraint` classes are available for use; custom behavior can be
25+
The _`TransformationPolicyType`_ template parameter refers to transformation
26+
strategy used to map decision variables to the desired domain during fitness
27+
evaluation and optimization termination. The `EmptyTransformation` and
28+
`BoundaryBoxConstraint` classes are available for use; custom behavior can be
2929
achieved by implementing a class with the same method signatures.
3030

3131
For convenience the following types can be used:
@@ -55,11 +55,11 @@ the option is not relevant when the `ActiveCMAES<>` optimizer type is being used
5555
`RandomSelection` policy has the constructor `RandomSelection(`_`fraction`_`)`
5656
where _`fraction`_ specifies the percentage of separable functions to use to
5757
estimate the objective function.
58-
The `transformationPolicy` attribute allows an instantiated
59-
`TransformationPolicyType` to be given. The `EmptyTransformation<`_`MatType`_`>`
58+
The `transformationPolicy` attribute allows an instantiated
59+
`TransformationPolicyType` to be given. The `EmptyTransformation<`_`MatType`_`>`
6060
has no need to be instantiated. `BoundaryBoxConstraint<`_`MatType`_`>` policy has
6161
the constructor `BoundaryBoxConstraint(`_`lowerBound, upperBound`_`)`
62-
where _`lowerBound`_ and _`lowerBound`_ are the lower bound and upper bound of
62+
where _`lowerBound`_ and _`lowerBound`_ are the lower bound and upper bound of
6363
the coordinates respectively.
6464

6565
#### Examples:
@@ -627,11 +627,11 @@ arma::mat coords = ZDT_THREE.GetInitialPoint();
627627
std::tuple<ObjectiveTypeA, ObjectiveTypeB> objectives = ZDT_THREE.GetObjectives();
628628
opt.Optimize(objectives, coords);
629629
const arma::cube bestFront = opt.ParetoFront();
630-
630+
631631
NSGA2 opt2(50, 5000, 0.5, 0.5, 1e-3, 1e-6, lowerBound, upperBound);
632632
// obj2 will contain the minimum sum of objectiveA and objectiveB found on the best front.
633633
double obj2 = opt2.Optimize(objectives, coords);
634-
634+
635635
arma::cube NSGAFront = opt2.ParetoFront();
636636
// Get the IGD score for NSGA front using AGEMOEA as reference.
637637
double igd = IGD::Evaluate(NSGAFront, bestFront, 1);
@@ -792,6 +792,10 @@ optimizer uses [L-BFGS](#l-bfgs).
792792
#### Constructors
793793

794794
* `AugLagrangian(`_`maxIterations, penaltyThresholdFactor, sigmaUpdateFactor`_`)`
795+
* `AugLagrangianType<_VecType_>(`_`maxIterations, penaltyThresholdFactor, sigmaUpdateFactor`_`)`
796+
797+
When optimizing matrix types other than `arma::mat`, specify `VecType` as the
798+
corresponding vector type (e.g. `arma::vec` or `coot::fvec`).
795799

796800
#### Attributes
797801

@@ -1112,10 +1116,10 @@ The _`SelectionPolicyType`_ template parameter refers to the strategy used to
11121116
compute the (approximate) objective function. The `FullSelection` and
11131117
`RandomSelection` classes are available for use; custom behavior can be achieved
11141118
by implementing a class with the same method signatures.
1115-
The _`TransformationPolicyType`_ template parameter refers to transformation
1116-
strategy used to map decision variables to the desired domain during fitness
1117-
evaluation and optimization termination. The `EmptyTransformation` and
1118-
`BoundaryBoxConstraint` classes are available for use; custom behavior can be
1119+
The _`TransformationPolicyType`_ template parameter refers to transformation
1120+
strategy used to map decision variables to the desired domain during fitness
1121+
evaluation and optimization termination. The `EmptyTransformation` and
1122+
`BoundaryBoxConstraint` classes are available for use; custom behavior can be
11191123
achieved by implementing a class with the same method signatures.
11201124
11211125
For convenience the following types can be used:
@@ -1145,11 +1149,11 @@ the option is not relevant when the `CMAES<>` optimizer type is being used; the
11451149
`RandomSelection` policy has the constructor `RandomSelection(`_`fraction`_`)`
11461150
where _`fraction`_ specifies the percentage of separable functions to use to
11471151
estimate the objective function.
1148-
The `transformationPolicy` attribute allows an instantiated
1149-
`TransformationPolicyType` to be given. The `EmptyTransformation<`_`MatType`_`>`
1152+
The `transformationPolicy` attribute allows an instantiated
1153+
`TransformationPolicyType` to be given. The `EmptyTransformation<`_`MatType`_`>`
11501154
has no need to be instantiated. `BoundaryBoxConstraint<`_`MatType`_`>` policy has
11511155
the constructor `BoundaryBoxConstraint(`_`lowerBound, upperBound`_`)`
1152-
where _`lowerBound`_ and _`lowerBound`_ are the lower bound and upper bound of
1156+
where _`lowerBound`_ and _`lowerBound`_ are the lower bound and upper bound of
11531157
the coordinates respectively.
11541158
11551159
#### Examples:
@@ -1745,10 +1749,10 @@ optimizer.Optimize(f, coordinates);
17451749
*An optimizer for [separable functions](#separable-functions).*
17461750

17471751
IPOP CMA-ES (Increasing Population Size CMA-ES) is an extension of the
1748-
Covariance Matrix Adaptation Evolution Strategy (CMA-ES). It introduces a
1749-
restart mechanism that progressively increases the population size. This
1752+
Covariance Matrix Adaptation Evolution Strategy (CMA-ES). It introduces a
1753+
restart mechanism that progressively increases the population size. This
17501754
approach is beneficial for optimizing multi-modal functions,
1751-
characterized by numerous local optima. The restart mechanism is designed to
1755+
characterized by numerous local optima. The restart mechanism is designed to
17521756
improve the adaptability of CMA-ES by improving the likelihood of escaping
17531757
local optima, thus increasing the chances of discovering the global optimum.
17541758

0 commit comments

Comments
 (0)