PolynomialKernel¶
Generate polynomial combinations of features.
This node will compute all polynomial combinations between the values in the given data up to the given degree. For instance, if you have two values a and b in the input data and you use degree 3, this will output the values a, b, aa, ab, bb, aaa, aab, abb, bb*b. Since this is a non-linear feature extractor, using a linear classifier (or regression method) on these features will result in a classification rule that is non-linear in the original data (for instance, as with polynomial-kernel Support Vector Machines). This is most useful when combined with classifiers for which there is not already a polynomial mode built in to the classifier, since using such a mode can be more efficient than doing it in two steps. Also note that the number of output features will be combinatorially larger than the number of values in the input data, especially for higher degrees -- as a result, using this node can easily become intractable or exceed the amount of free memory. At the very least, the large number of features needs to be counter-acted by strong regularization in the classifier, such as, for instance, sparsity, since otherwise the classifier will likely overfit to accidentally correlated features. Like most other feature extraction nodes, this node can compute features between elements of an axis of your choice while treating elements of another axis as the observations, trials, or samples. It can also optionally compute multiple separate models on different slices of the data along some axis of choice. It is also possible to pool multiple axes for any of these roles. More Info... Version 1.0.0
Ports/Properties¶
domain_axes¶
Axes which form the input domain of the transformation. Features are computed between elements along these axes (or in other words, elements along these axes will be combined with each other to yield features). This is a comma-separated list of axis names (for example: "space, frequency"), possibly empty, or the special string "(all others)", which stands for all axes that are not listed in the other two lists of axes. For time-series data, this is usually the space axis, and if features have already been extracted from the data through some other method, it would be the features axis. In rare cases it can also include other axes, such as frequency, lag, and time. This axis drops out of the data and is replaced by a feature axis that has a number of elements that corresponds to the output feature dimension of the model.
- verbose name: Compute Features Between Axes
- default value: (all others)
- port type: ComboPort
- value type: str (can be None)
aggregate_axes¶
Axes that have the statistical observations in them. The elements along these axes are treated as the "trials", "samples", or, equivalently, "observations". Adaptive feature extractors will aggregate statistics along the elements of these axes during training. When the transformer applies to data, this axis remains in the data (if multiple, they will be flattened into one axis, however). This is a comma-separated list of axis names (for example: "time, instance"), possibly empty, or the special string "(all others)", which stands for all axes that are not listed in the other two lists of axes. 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.
- verbose name: Treat Elements As Trials/samples Along Axes
- default value: instance
- port type: ComboPort
- value type: str (can be None)
separate_axes¶
Axes along which to learn separate models. It is possible to use multiple separate feature-extraction models, each of which operates on a different slice of the data. This node does not combine data between elements along these axes in any way (although features between these elements may of course be combined in later stages, for instance in a classifier node). This is a comma-separated list of axis names (for example: "time, frequency"), possibly empty, or the special string "(all others)", which stands for all axes that are not listed in the other two lists of axes. This axis, if any, will also persist in the data.
- verbose name: Compute Separate Models Along Axes
- default value:
- port type: ComboPort
- value type: str (can be None)
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
degree¶
Polynomial degree. Compute polynomial features up to this degree.
- verbose name: Polynomial Degree
- default value: 2
- port type: IntPort
- value type: int (can be None)
interaction_only¶
Generate only interaction terms. If enabled, univariate powers of each feature (e.g., x^3) are not included.
- verbose name: Generate Only Interaction Terms
- default value: False
- port type: BoolPort
- value type: bool (can be None)
include_bias¶
Include a bias feature (constant 1). This should only be done when the subsequent machine learning node (if any) does not already include a bias term -- if it does, adding another one can result in a broken model.
- verbose name: Include Bias Term
- 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)