-
3.39.22
|
The class intents to set input parameters for the Palm4MSA algorithm. More...
Public Member Functions | |
def | __init__ (self, constraints, stop_crit, init_facts=None, is_update_way_R2L=False, init_lambda=1.0, step_size=10.0 **-16, constant_step_size=False, is_verbose=False, norm2_max_iter=100, norm2_threshold=1e-6, grad_calc_opt_mode=ParamsFact.EXTERNAL_OPT, **kwargs) |
Constructor. More... | |
def | are_constraints_consistent (self, M) |
This method verifies that the constraints are shape-consistent to the matrix/array M to factorize and with each other. More... | |
def | __repr__ (self) |
Returns object representation. More... | |
Public Member Functions inherited from pyfaust.factparams.ParamsFact | |
def | __init__ (self, num_facts, is_update_way_R2L, init_lambda, constraints, step_size, constant_step_size, is_verbose, factor_format='dynamic', packing_RL=True, no_normalization=False, no_lambda=False, norm2_max_iter=100, norm2_threshold=1e-6, grad_calc_opt_mode=EXTERNAL_OPT, **kwargs) |
Additional Inherited Members | |
Static Public Member Functions inherited from pyfaust.factparams.ParamsFact | |
def | factor_format_str2int (factor_format) |
def | factor_format_int2str (factor_format) |
def | get_constraints (projs) |
Returns a python list of constraints from the projs which is a ConstralintList or a list/tuple that can be a mix of ConstraintGeneric or pyfaust.proj.proj_gen. More... | |
Public Attributes inherited from pyfaust.factparams.ParamsFact | |
step_size | |
constant_step_size | |
norm2_max_iter | |
norm2_threshold | |
factor_format | |
packing_RL | |
no_normalization | |
no_lambda | |
use_MHTP | |
The class intents to set input parameters for the Palm4MSA algorithm.
def pyfaust.factparams.ParamsPalm4MSA.__init__ | ( | self, | |
constraints, | |||
stop_crit, | |||
init_facts = None , |
|||
is_update_way_R2L = False , |
|||
init_lambda = 1.0 , |
|||
step_size = 10.0**-16 , |
|||
constant_step_size = False , |
|||
is_verbose = False , |
|||
norm2_max_iter = 100 , |
|||
norm2_threshold = 1e-6 , |
|||
grad_calc_opt_mode = ParamsFact.EXTERNAL_OPT , |
|||
** | kwargs | ||
) |
Constructor.
constraints | (ConstraintList or list[pyfaust.proj.proj_gen]). The number of items determines the number of matrix factors. |
stop_crit | (pyfaust.factparams.StoppingCriterion) defines the algorithm stopping criterion. |
init_facts | (list [np.ndarray or scipy.sparse.csr_matrix ]) if defined, pyfaust.fact.palm4msa will initialize the factors with init_facts (by default, None, implies that the first factor to be updated is initialized to zero and the others to identity. Note that the so called first factor can be the rightmost or the leftmost depending on the is_update_way_R2L argument). Note also that the matrices must be np.ndarray if the backend argument of pyfaust.fact.palm4msa is equal to 2016, otherwise (backend==2020) it is possible to use np.ndarray or scipy.sparse.csr_matrix (depending of the ParamsPalm4MSA.factor_format attribute). |
is_update_way_R2L | (bool ) if True pyfaust.fact.palm4msa will update factors from the right to the left, otherwise it's done in reverse order. |
init_lambda | (float ) the scale scalar initial value (by default the value is one). |
step_size | (float ) the initial step of the PALM descent. |
constant_step_size | (bool ) if True the step_size keeps constant along the algorithm iterations otherwise it is updated before every factor update. |
is_verbose | (bool ) True to enable the verbose mode. |
norm2_max_iter | (float ) maximum number of iterations of power iteration algorithm. Used for computing 2-norm. |
norm2_threshold | (float ) power iteration algorithm threshold (default to 1e-6). Used for computing 2-norm. |
grad_calc_opt_mode | (float ) the mode used for computing the PALM gradient. It can be one value among pyfaust.factparams.ParamsFact.EXTERNAL_OPT , pyfaust.factparams.ParamsFact.INTERNAL_OPT or pyfaust.factparams.ParamsFact.DISABLED_OPT . This parameter is experimental, its value shouldn't be changed. |
no_normalization | (bool ) False (by default), if True it disables the normalization of prox output matrix in PALM4MSA algorithm. Note that this option is experimental. |
no_lambda | (bool ) False (by default), if True it disables the lambda scalar factor in the PALM4MSA algorithm which consists basically to set it always to one (it lowers also the algorithm cost). |
def pyfaust.factparams.ParamsPalm4MSA.__repr__ | ( | self | ) |
Returns object representation.
Reimplemented from pyfaust.factparams.ParamsFact.
def pyfaust.factparams.ParamsPalm4MSA.are_constraints_consistent | ( | self, | |
M | |||
) |
This method verifies that the constraints are shape-consistent to the matrix/array M to factorize and with each other.