GroupSparsePenalty¶
A penalty encouraging group-sparse solutions with groups corresponding to the entries along one or more axes; implemented as a proximal operator.
The general effect is that, given an axis along which to group (e.g., time), the values along that axis tend to be all-zero for most indices along the other axes (e.g., space or feature) that are not listed as a group axis. The idea is that only a few groups of elements are active in any given solution, but when a group is active, the elements in the group tend to be active or inactive together (e.g., all time points are active for a small subset of channels while no time points are active for most channels. This node can implement a number of different group norms, including the l1/l2 norm (the default), the more lax l1/linf norm (which leaves the magnitude of elements within an active group less constrained), and mixed norm that combine a group norm with a pointwise sparsity norm. The latter additionally encourage that even within active groups only a few elements are active at any given time. One can also give a comma-separated list of multiple axes (e.g., time,space) to group along both axes simultaneously. A less common use case is the non-convex lp,q norm, which can may work better in practice given a skilled choice of solver and problem setup, but which sacrifices the otherwise guaranteed global optimality. Like all proximal operators, this is normally used as part of the optimization problem formulation given to a (typically convex) solver node. Version 1.0.0
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: object (can be None)
- data direction: INOUT
step_size¶
Step size.
- verbose name: Step Size
- default value: None
- port type: DataPort
- value type: float (can be None)
- data direction: IN
step_count¶
Current step count for outer solver.
- verbose name: Step Count
- default value: None
- port type: DataPort
- value type: int (can be None)
- data direction: IN
axis¶
Axis along which the elements are in the same group. For example, if this is set to 'time', then all time points are active or inactive together, but the result is sparse along all other axes (e.g., channels), meaning that only a few channels will have active time points. You can also give a comma-separated list of multiple axes (e.g., time,space) to group along both axes simultaneously, which again results in a solution that is sparse along any other axes.
- verbose name: Axis With Grouped Elements
- default value: time
- port type: ComboPort
- value type: str (can be None)
norm¶
The norm to use for the group sparsity penalty. The default choice is l1/l2, which is the sum of l2 norms of each group. An alternative choice is l1/linf, which is the sum of the max norms of each group; this penalizes only the largest element in each group, which has the side effect of leaving the other elements in the group unpenalized; as such, the assumption is that if a group is active (nonzero), then any element in the group is equally likely to be active. The next two choices are the sum of a groupwise norm and a pointwise sparsity norm. This has the effect that only a few groups are active, and the active groups have only a few active nonzero elements; the pointwise sparsity is controlled via the point_sparsity parameter. The lp,q option is the only non-convex group- sparse penality, which jettisons the guaranteed optimality but which can in practice work better than the convex options given a skilled choice of solver and problem setup.
- verbose name: Norm
- default value: l1/l2
- port type: EnumPort
- value type: str (can be None)
group_sparsity¶
Degree of group-wise sparsity in the solution. Larger values will encourage fewer non-zero groups of elements to remain in the solution.
- verbose name: Group Sparsity
- default value: 1.0
- port type: FloatPort
- value type: float (can be None)
point_sparsity¶
Degree of point-wise sparsity in the solution. This can only be used when a mixed norm is chosen that has an additional +l1 term in it.
- verbose name: Point Sparsity
- default value: 0.0
- port type: FloatPort
- value type: float (can be None)
norm_shape¶
Shape of the non-convex p,q norm, if selected. This is only used if the norm is set to "lp,q". The shape is a list of two numbers, the first of which is the p value (within-group penality, must be one of 1,2) and between-group penalty q (must be between 0 and 1). Note that not all of these combinations are implemented; the most likely to be supported ones are [2,1/2], and [2,2/3].
- verbose name: Norm Parameter (If Norm Is Lp,q)
- default value: None
- port type: ListPort
- value type: list (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)