TensorDecomposition¶
Decompose a tensor into a number of rank-1 tensors.
This is analagous to a tensor version of matrix SVD. The algorithm used is the canonical polyadic decomposition (aka PARAFAC) via alternating least-squares. For example, a tensor with dimensions N neurons, T time points, and I instances (trials) can be decomposed into R latent factors, where each factor is rank-1 and can be thought of as a linear combination of neurons, timepoints, and trials. Important:This node is adaptive to the data, that is, it will learn a transformation of the data that depends on the input data. In order to learn this transformation, the node requires a reasonable amount of input data for calibration or "training" (otherwise it will yield an ill-fitting or noisy model). Since this feature extraction method is not capable of being trained incrementally on streaming data, the method requires a data packet that contains the entire training data; this training data packet can either be accumulated online and then released in one shot using the Accumulate Calibration Data node, or it can be imported from a separate calibration recording and then spliced into the processing pipeline using the Inject Calibration Data, where it passes through the same nodes as the regular data until it reaches the machine learning node, where it is used for calibration. Once this node is calibrated, the trainable state of this node can be saved to a model file and later loaded for continued use. More Info... Version 1.1.1
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
num_components¶
Number of components to include in the model.
- verbose name: Number Of Components
- default value: 3
- port type: IntPort
- value type: int (can be None)
algorithm¶
cp_als: Canonical Polyadic decomposition using Alternating Least Squares method; ncp_bcd: non-negative CP Decomposition using the Block Coordinate Descent method; ncp_hals: non-negative CP Decomposition using the Hierarchical Alternating Least Squares method.
- verbose name: Algorithm
- default value: cp_als
- port type: EnumPort
- value type: str (can be None)
tol¶
Optimization convergence criterion.
- verbose name: Tol
- default value: 1e-06
- port type: FloatPort
- value type: float (can be None)
max_iter¶
Maximum number of iterations to perform before exiting.
- verbose name: Max Iter
- default value: 500
- port type: IntPort
- value type: int (can be None)
min_iter¶
Minimum number of iterations to perform before exiting.
- verbose name: Min Iter
- default value: 1
- port type: IntPort
- value type: int (can be None)
aggregate_axes¶
Axes to aggregate statistics over. The elements along these axes are treated as the "trials", "samples", or, equivalently, "observations". Adaptive feature extractors will compute statistics along the elements of these axes. This is a comma-separated list of axis names (for example: ["time", "instance"]). This is almost always the instance axis (especially if the data has already been segmented, i.e., if the Segmentation node was used), but in some cases it may also be the time axis, or occasionally other axes. In this Node, these are the axes to preserve in the output. Use ["none"] if no axes are to be preserved.
- verbose name: Treat Elements As Trials/samples Along Axes
- default value: ['instance']
- port type: ListPort
- value type: list (can be None)
ignore_reset¶
Do not reset the model when the preceding graph is changed. Normally, when certain parameters of preceding nodes are being changed, the model will be reset. If this is enabled, the model will persist, but there is a chance that the model is incompatible when input data format to this node has changed.
- verbose name: Do Not Reset Model
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)