Public Member Functions | Public Attributes | List of all members
test_basis.TestBasis Class Reference
Inheritance diagram for test_basis.TestBasis:
Inheritance graph
[legend]

Public Member Functions

def evaluate (self, basis, fitparams, x)
 
def fit_basis_helper (self, fitter, basis, f=lambda x:x)
 
def setUp (self)
 
def test_fit_basis_chebyshev1basis (self)
 
def test_fit_basis_chebyshev2 (self)
 
def test_fit_basis_chebyshev2basis (self)
 
def test_fit_basis_fourier (self)
 
- Public Member Functions inherited from gtsam.utils.test_case.GtsamTestCase
def assertEqualityOnPickleRoundtrip
 
def gtsamAssertEquals (self, actual, expected, tol=1e-9)
 

Public Attributes

 interpx
 
 N
 
 noise
 
 x
 

Detailed Description

Tests FitBasis python binding for FourierBasis, Chebyshev1Basis, Chebyshev2Basis, and Chebyshev2.

It tests FitBasis by fitting to a ground-truth function that can be represented exactly in
the basis, then checking that the regression (fit result) matches the function.  For the
Chebyshev bases, the line y=x is used to generate the data while for Fourier, 0.7*cos(x) is
used.

Definition at line 20 of file test_basis.py.

Member Function Documentation

◆ evaluate()

def test_basis.TestBasis.evaluate (   self,
  basis,
  fitparams,
  x 
)
Until wrapper for Basis functors are ready,
this is how to evaluate a basis function.

Definition at line 35 of file test_basis.py.

◆ fit_basis_helper()

def test_basis.TestBasis.fit_basis_helper (   self,
  fitter,
  basis,
  f = lambda x: x 
)
Helper method to fit data to a specified fitter using a specified basis.

Definition at line 42 of file test_basis.py.

◆ setUp()

def test_basis.TestBasis.setUp (   self)

Definition at line 29 of file test_basis.py.

◆ test_fit_basis_chebyshev1basis()

def test_basis.TestBasis.test_fit_basis_chebyshev1basis (   self)
Fit a Chebyshev1 basis.

Definition at line 61 of file test_basis.py.

◆ test_fit_basis_chebyshev2()

def test_basis.TestBasis.test_fit_basis_chebyshev2 (   self)
Fit a Chebyshev2 pseudospectral basis.

Definition at line 83 of file test_basis.py.

◆ test_fit_basis_chebyshev2basis()

def test_basis.TestBasis.test_fit_basis_chebyshev2basis (   self)
Fit a Chebyshev2 basis.

Definition at line 72 of file test_basis.py.

◆ test_fit_basis_fourier()

def test_basis.TestBasis.test_fit_basis_fourier (   self)
Fit a Fourier basis.

Definition at line 50 of file test_basis.py.

Member Data Documentation

◆ interpx

test_basis.TestBasis.interpx

Definition at line 32 of file test_basis.py.

◆ N

test_basis.TestBasis.N

Definition at line 30 of file test_basis.py.

◆ noise

test_basis.TestBasis.noise

Definition at line 33 of file test_basis.py.

◆ x

test_basis.TestBasis.x

Definition at line 31 of file test_basis.py.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:31