pathsig.projections.words#
- pathsig.projections.words(words, depth, path_dim, full_levels=())#
Projection selecting an explicit word set.
- Parameters:
words (iterable of iterable of int) – Nested iterable of words.
depth (int) – Maximum word length (signature level) to include.
path_dim (int) – Path dimension (alphabet size).
full_levels (iterable of int) – (optional) Levels in \(\{1,2,\ldots,\mathrm{depth}\}\) to include in full in addition to the explicitly provided words.
- Returns:
Projection object to be used with
pathsig.Signatureandpathsig.LogSignature.- Return type:
Projection
Notes
Words are specified as integer sequences over the 0-based alphabet \(\{0,\ldots,\texttt{path\_dim}-1\}\). Only words of length at most
depthare included. The input iterable must be ordered by non-decreasing word length.Examples
import pathsig proj = pathsig.projections.words( words=[(2, 3), (3, 2), (2, 3, 3), (3, 2, 3), (2, 3, 2)], depth=3, path_dim=4, full_levels=(1,), ) sig_size = proj.sig_size # output feature dimension