Skip to content
/ cpp-rbf Public

Linearly parameterized Gaussian Radial Basis Function approximator written in C++

License

Notifications You must be signed in to change notification settings

jarkki/cpp-rbf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-rbf is linearly parameterized Gaussian Radial Basis Function approximator written in C++.

Example approximation to two-dimensional sin with Gaussian noise (sd=0.3) with 300 uniform random samples:

Example approximation to sin with Gaussian noise (sd=0.3):

Introduction

Gaussian Radial Basis Function approximator is a parametric approximator for smooth functions. It is especially useful when one needs to approximate smooth function from noisy observations.

For input , the approximation is given by

where is the number of radial basis centroids , are the weights, is the basis function and the norm is usually taken to be the Euclidean distance.

The centroids are equally spaced points in the input space where the basis functions are centered.

While other basis functions can be used, the Gaussian density is a popular choice for continuous function approximation. The Gaussian density is given by

where is a scaling factor. While this basis function is nonlinear, the approximator is linear in the weights and so the solution can be approximated with linear least-squares.

Installation

cpp-rbf is a header-only library and uses some c++11 features.

Dependencies

For plotting the example plots, you also need

Compilation

To run the example examples/testrbf.cpp that approximates 2d and 3d sin(),

  1. Edit the makefile to include the location of Armadillo headers and library.
  2. Run make in the project root directory.

Example

See examples/testrbf.cpp.

License

cpp-rbf is made available under the terms of the GPLv3.

See the LICENSE file that accompanies this distribution for the full text of the license.

About

Linearly parameterized Gaussian Radial Basis Function approximator written in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published