basischan
#
- hypercoil.functional.tsconv.basischan(X: Tensor, basis_functions: List[Callable], include_const: bool = False) Tensor [source]#
Create a channel basis for the data.
Given K basis functions, single-channel data are mapped across K channels, and the ith channel is constituted by evaluating the ith basis function over the input data.
- Dimension:
- Input : \((N, *, C, obs)\)
N denotes batch size,
*
denotes any number of intervening dimensions, C denotes number of data channels or variables, obs denotes number of observations per channel.- Output : \((N, K, *, C, obs)\)
K denotes the number of basis functions.
- Parameters:
- XTensor
Dataset to expand with basis functions. A new channel will be created containing the same dataset transformed using each basis function.
- basis_functionslist(callable)
Functions to use to constitute the basis. Each function’s signature must map a single input to a single output of the same dimension. Use partial functions as appropriate to conform function signatures to this requirement.
- include_constbool (default False)
Indicates that a constant or intercept term should be included.