2. Toy Examples
2.1. Univariate Polynomials
The below plots are generated by calling the following lines of code.
You can find the full code in the __main__ section of the corresponding module.
lifter = Poly4Lifter.create_example(example_type="A") # choose A or B
lifter.plot_cost()
- class popcor.examples.Poly4Lifter[source]
Bases:
PolyLifterFourth-degree polynomial lifter.
Two example types are provided and selected with create_example(example_type=…).
example_type=”A”: one global minimum at -1, one local minimum at 2.
example_type=”B”: two global minima at 1 and 3.
Poly4Lifter Type A
Poly4Lifter Type B
- class popcor.examples.Poly6Lifter[source]
Bases:
PolyLifterSixth-degree polynomial examples.
Two example types are provided and selected with create_example(example_type=…).
example_type=”A”: one global minimum, two local minima, two local maxima
example_type=”B”: one global minimum, one local minimum, one local maximum
Poly6Lifter Type A
Poly6Lifter Type B
2.2. Other Toy Examples
- class popcor.examples.Stereo1DLifter(n_landmarks: int, param_level: str = 'no')[source]
Bases:
StateLifterToy example for stereo localization in 1D. We minimize the following cost function:
\[f(\theta) = \sum_{j=0}^{N-1} (u_j - 1 / (\theta - a_j))^2\]where \(a_j\) are the landmarks and \(u_j\) are the measurements.
This is the pedagogical running example of this paper. and also used in the Quick Start Guide.