ModOpt icon indicating copy to clipboard operation
ModOpt copied to clipboard

[NEW FEATURE] COmposition Operator

Open chaithyagr opened this issue 5 years ago • 0 comments

Is your feature request related to a problem? Please describe. We need a composition operator that takes in a vector of operators and carries out composition. These indivitual operations can as well be proximity or linear operators. This way we can implement SparseGroupLASSO as GroupLASSO(SparseThreshold) and so on.

Describe the solution you'd like Implement a class as:

class CompositionOperator(Base):
    def __init__(list_of_operators):
        self.list = list
...
    def _op_method(data):
        result = data
        for i in range(len(self.list):
            result = self.list[i].op(result)
        return result

Are you planning to submit a Pull Request?

  • [X] Yes
  • [ ] No

chaithyagr avatar Jan 31 '20 16:01 chaithyagr