nemos.basis.HistoryConv.evaluate_on_grid#

HistoryConv.evaluate_on_grid(n_samples)[source]#

Evaluate the basis set on a grid of equi-spaced sample points.

Parameters:

n_samples (int) – The number of points used to construct the identity matrix.

Return type:

Tuple[NDArray, NDArray]

Returns:

  • X – Array of shape (n_samples,) containing a equi-spaced samples between 0 and 1.

  • basis_funcs – The identity matrix of shape, i.e. np.eye(window_size, n_samples).

Examples

>>> import matplotlib.pyplot as plt
>>> from nemos.basis import HistoryConv
>>> window_size=100
>>> basis = HistoryConv(window_size=window_size)
>>> sample_points, basis_values = basis.evaluate_on_grid(window_size)