Skip to content

← optimization package

NonuniformGroupSparsePenalty

A penalty encouraging group-sparse (few nonzero groups of elements) solutions along one or more axes with non-uniform group sizes, implemented as a proximal operator.

The general use case is to specify an axis along which groups are defined (e.g., feature), and then to supply an array of group membership indices (e.g., [0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]) that assignes different features to different groups. The effect is then that only a few groups of elements are active in any given solution. The node supports both the default l1/l2 norm and the more lax l1/linf norm (which leaves the magnitude of elements within an active group less constrained); currently, mixed norms that additionally feature a pointwise sparsity norm are not supported (but can be realized with solvers that support more than one proximal operator). One can also give a comma-separated list of multiple axes (e.g., time,space) to define groups that extend across both axes, but be careful about the order in which the elements appear in the flattened axis. 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 appear in groups. For example, if this is set to 'feature', then different features can be assigned to different groups, but the result is sparse along all other axes (e.g., channels). You can also give a comma-separated list of multiple axes (e.g., time,space) which are flattened before group indices are taken into consideration.

verbose name
Axis With Groups
default value
feature
port type
ComboPort
value type
str (can be None)

membership

List of group membership indices. Each element is a 0-based integer that indicates the group to which the respective element along the given axis belongs.

verbose name
Membership
default value
None
port type
ListPort
value type
list (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.

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)

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)