Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
gtsam::FitBasis< Basis > Class Template Reference

#include <FitBasis.h>

Public Types

using Parameters = typename Basis::Parameters
 

Public Member Functions

 FitBasis (const Sequence &sequence, const SharedNoiseModel &model, size_t N)
 Construct a new FitBasis object. More...
 
Parameters parameters () const
 Return Fourier coefficients. More...
 

Static Public Member Functions

static GaussianFactorGraph::shared_ptr LinearGraph (const Sequence &sequence, const SharedNoiseModel &model, size_t N)
 Create linear FG from Sequence. More...
 
static NonlinearFactorGraph NonlinearGraph (const Sequence &sequence, const SharedNoiseModel &model, size_t N)
 Create nonlinear FG from Sequence. More...
 

Private Attributes

Parameters parameters_
 

Detailed Description

template<class Basis>
class gtsam::FitBasis< Basis >

Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebyshev2>(data_points, noise_model, N); Vector coefficients = fit.parameters();

where data_points are a map from x to y values indicating a function mapping at specific points, noise_model is the gaussian noise model, and N is the degree of the polynomial basis used to fit the function.

Definition at line 52 of file FitBasis.h.

Member Typedef Documentation

◆ Parameters

template<class Basis>
using gtsam::FitBasis< Basis >::Parameters = typename Basis::Parameters

Definition at line 54 of file FitBasis.h.

Constructor & Destructor Documentation

◆ FitBasis()

template<class Basis>
gtsam::FitBasis< Basis >::FitBasis ( const Sequence sequence,
const SharedNoiseModel model,
size_t  N 
)
inline

Construct a new FitBasis object.

Parameters
sequencemap of x->y values for a function, a.k.a. y = f(x).
modelThe noise model to use.
NThe degree of the polynomial to fit.

Definition at line 89 of file FitBasis.h.

Member Function Documentation

◆ LinearGraph()

template<class Basis>
static GaussianFactorGraph::shared_ptr gtsam::FitBasis< Basis >::LinearGraph ( const Sequence sequence,
const SharedNoiseModel model,
size_t  N 
)
inlinestatic

Create linear FG from Sequence.

Definition at line 73 of file FitBasis.h.

◆ NonlinearGraph()

template<class Basis>
static NonlinearFactorGraph gtsam::FitBasis< Basis >::NonlinearGraph ( const Sequence sequence,
const SharedNoiseModel model,
size_t  N 
)
inlinestatic

Create nonlinear FG from Sequence.

Definition at line 61 of file FitBasis.h.

◆ parameters()

template<class Basis>
Parameters gtsam::FitBasis< Basis >::parameters ( ) const
inline

Return Fourier coefficients.

Definition at line 96 of file FitBasis.h.

Member Data Documentation

◆ parameters_

template<class Basis>
Parameters gtsam::FitBasis< Basis >::parameters_
private

Definition at line 57 of file FitBasis.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:18