create_basis {BPRMeth} | R Documentation

## Create basis objects

### Description

These functions create different basis objects, which can be used as input to complex functions in order to perform computations depending on the class of the basis function.

### Usage

    create_rbf_object(
      M = 2,
      gamma = NULL,
      mus = NULL,
      eq_spaced_mus = TRUE,
      whole_region = TRUE
    )

    create_polynomial_object(M = 1)

    create_fourier_object(M = 2, period = 2)

### Arguments

`M` | The number of the basis functions. In case of Fourier basis, this number should be even, since we need to have pairs of sines and cosines and the constant term is added by default.
`gamma` | Inverse width of radial basis function.
`mus` | Optional centers of the RBF.
`eq_spaced_mus` | Logical, if TRUE, equally spaced centers are created, otherwise centers are created using `kmeans` algorithm.
`whole_region` | Logical, indicating if the centers will be evaluated equally spaced on the whole region, or between the min and max of the observation values.
`period` | The period, that is the basis functions are periodic on a specific interval. Best choice is the range of the points used for regression.

### Value

A basis object of class 'rbf', 'polynomial' or 'fourier'.

### Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

### See Also

`eval_functions`, `design_matrix`

### Examples

    (obj <- create_rbf_object(M = 2))

    #---------------------------------

    (obj <- create_polynomial_object(M = 2))

    (obj <- create_fourier_object(M = 2, period = 1))

[Package BPRMeth version 1.18.0 Index]