polychan
#
- hypercoil.functional.tsconv.polychan(X: Tensor, degree: int = 2, include_const: bool = False) Tensor [source]#
Create a polynomial channel basis for the data.
Single-channel data are mapped across K channels, and raised to the ith power at the ith channel.
- 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 maximum polynomial degree to include
- Parameters:
- XTensor
Dataset to expand as a polynomial basis. A new channel will be created containing the same dataset raised to each power up to the specified degree.
- degreeint >= 2 (default 2)
Maximum polynomial degree to be included in the output basis.
- include_constbool (default False)
Indicates that a constant or intercept term corresponding to the zeroth power should be included.
- Returns:
- outTensor
Input dataset expanded as a K-channel polynomial basis.