nemos.basis.IdentityEval.compute_features#
- IdentityEval.compute_features(xi)[source]#
Evaluate basis at sample points.
The basis is evaluated at the locations specified in the inputs. For example,
compute_features(np.array([0, .5]))
would return the array:b_1(0) ... b_n(0) b_1(.5) ... b_n(.5)
where
b_i
is the i-th basis.- Parameters:
*xi (ArrayLike) – The input samples over which to apply the basis transformation. The samples can be passed as multiple arguments, each representing a different dimension for multivariate inputs.
- Return type:
TsdFrame
|ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]- Returns:
A matrix with the transformed features.
Examples
>>> import numpy as np >>> from nemos.basis import IdentityEval
>>> # Generate data >>> num_samples = 1000 >>> X = np.random.normal(size=(num_samples, )) # raw time series >>> basis = IdentityEval() >>> features = basis.compute_features(X) # basis transformed time series >>> features.shape (1000, 1)