-  3.39.22
Public Member Functions | Public Attributes | List of all members
pyfaust.proj.skperm Class Reference

Functor for the SKPERM projector. More...

Public Member Functions

def __init__ (self, shape, k, normalized=True, pos=False)
 Projector constructor. More...
 
- Public Member Functions inherited from pyfaust.proj.proj_gen
def __init__ (self, shape)
 
def __call__ (self, M)
 

Public Attributes

 constraint
 
- Public Attributes inherited from pyfaust.proj.proj_gen
 shape
 

Detailed Description

Functor for the SKPERM projector.

Examples

>>> from pyfaust.proj import skperm
>>> import numpy as np
>>> from numpy import array
>>> k = 2
>>> M = array([[-0.04440802, -0.17569296, -0.02557815, -0.15559154], \

[-0.0083095, -3.38725936, -0.78484126, -0.4883618 ], \ [-1.48942563, -1.71787215, -0.84000212, -3.71752454], \ [-0.88957883, -0.19107863, -5.92900636, -6.51064175]])

>>> p = skperm(M.shape, k, normalized=False)
>>> p(M)
array([[-0.04440802, 0. , -0.02557815, 0. ],
[-0.0083095 , -3.38725936, 0. , 0. ],
[ 0. , -1.71787215, 0. , -3.71752454],
[ 0. , 0. , -5.92900636, -6.51064175]])
Reference
[1] Quoc-Tung Le, RĂ©mi Gribonval. Structured Support Exploration For Multilayer Sparse Matrix Fac- torization. ICASSP 2021 - IEEE International Conference on Acoustics, Speech and Signal Processing, Jun 2021, Toronto, Ontario, Canada. pp.1-5 hal-03132013.

Constructor & Destructor Documentation

◆ __init__()

def pyfaust.proj.skperm.__init__ (   self,
  shape,
  k,
  normalized = True,
  pos = False 
)

Projector constructor.

Parameters
shape(tuple(int,int)) the size of the input matrix.
k(int) the integer sparsity (number of nonzeros) targeted per-row and per-column.
normalized(bool) True to normalize the projection image according to its Frobenius norm.
pos(bool) True to skip negative values (replaced by zero) of the matrix to project.

Member Data Documentation

◆ constraint

pyfaust.proj.skperm.constraint

The documentation for this class was generated from the following file:
pyfaust.proj
This module provides matrix projectors.
Definition: proj.py:1