Skip to content

← optimization package

OverlappingGroupSparsePenalty

A penalty encouraging group-sparse (few nonzero groups of elements) solutions along one or more axes with overlapping and 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 a list of group membership index arrays (e.g., [[0,1,2],[2,3,4],[5,6]]) which may overlap and which may differ in size. The effect is then that only a few groups of elements are active in any given solution, and the pattern of active elements will be a union of groups. This is also known as the latent group lasso. Note that an alternative way to realize this type of model is to duplicate all features that occur in multiple groups, to define a model in terms of those expanded features, and to use a non overlapping (but potentially still non-uniform) group sparse penalty, which can be much faster except for a very high overlap factor, but which may also use more memory. 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)

groups

List of group index arrays. The k'th list entry is an array or list indices of elements (along the axis of interest) that are in the k'th group.

  • verbose name: Groups
  • 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)

eps0

initial relative convergence tolerance. This value is exponentially decayed during the optimization according to the alpha parameter.

  • verbose name: Eps0
  • default value: 0.01
  • port type: FloatPort
  • value type: float (can be None)

decay

Exponential decay factor for eps0.

  • verbose name: Decay
  • default value: 2.0
  • port type: FloatPort
  • value type: float (can be None)

abstol

Absolute convergence tolerance.

  • verbose name: Abstol
  • default value: 1e-07
  • port type: FloatPort
  • value type: float (can be None)

maxiter

Maximum number of iterations (passes over the active groups).

  • verbose name: Maxiter
  • default value: 200
  • port type: IntPort
  • value type: int (can be None)

verbose

Whether to print verbose output.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

use_copt

Use the COPT implementation when using the linf norm. This is faster than the current built-in implementation, but can only be used in conjunction with custom solvers.

  • verbose name: Use Copt
  • 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)