-
3.39.17
|
This class is a simplified ParamsHierarchical in which you define only the pyfaust.fact.hierarchical resulting Faust factors constraints. More...
Public Member Functions | |
def | __init__ (self, fact_constraints, stop_crit1, stop_crit2, is_update_way_R2L=False, init_lambda=1.0, step_size=10.0 **-16, constant_step_size=False, is_fact_side_left=False, is_verbose=False, factor_format='dynamic', packing_RL=True, no_normalization=False, no_lambda=False, norm2_max_iter=100, norm2_threshold=1e-6, grad_calc_opt_mode=ParamsFact.EXTERNAL_OPT, **kwargs) |
Constructor. More... | |
![]() | |
def | __init__ (self, fact_constraints, res_constraints, stop_crit1, stop_crit2, is_update_way_R2L=False, init_lambda=1.0, step_size=10.0 **-16, constant_step_size=False, is_fact_side_left=False, is_verbose=False, factor_format='dynamic', packing_RL=True, no_normalization=False, no_lambda=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... | |
![]() | |
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 | |
![]() | |
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... | |
![]() | |
step_size | |
constant_step_size | |
norm2_max_iter | |
norm2_threshold | |
factor_format | |
packing_RL | |
no_normalization | |
no_lambda | |
use_MHTP | |
This class is a simplified ParamsHierarchical in which you define only the pyfaust.fact.hierarchical resulting Faust factors constraints.
You don't have to define the intermediate residual factors as you normally do with a ParamsHierarchical. With a ParamsHierachicalNoResCons they are defined automatically/internally using pyfaust.proj.proj_id. It means that only the gradient descent of PALM4MSA modify the residual factors. The only residual factor you have to define the constraint for, is the last one (because it is present in the resulting Faust of pyfaust.fact.hierarchical).
The example below shows (for a Hadamard matrix factorization) the definition of a ParamsHierarchical instance and its simpler equivalent (with the same set of internal defaultly defined residual constraints) as a ParamsHierachicalNoResCons. It allows to get exactly what is exactly a ParamsHierarchicalNoResCons internally. This example is a detailed way to the same thing as ParamsHierarchicalWHTNoResCons.
Examples
This example shows two parameterizations that are equivalent. The first one, p1, is defined through a ParamsHierarchical instance while the second one, p2, is defined using a ParamsHierarchicalNoResCons instance.
F1= Faust size 32x32, density 0.3125, nnz_sum 320, 5 factor(s):
F1 error = 7.850462159063938e-16
F2= Faust size 32x32, density 0.3125, nnz_sum 320, 5 factor(s):
F2 error = 7.850462159063938e-16
def pyfaust.factparams.ParamsHierarchicalNoResCons.__init__ | ( | self, | |
fact_constraints, | |||
stop_crit1, | |||
stop_crit2, | |||
is_update_way_R2L = False , |
|||
init_lambda = 1.0 , |
|||
step_size = 10.0**-16 , |
|||
constant_step_size = False , |
|||
is_fact_side_left = False , |
|||
is_verbose = False , |
|||
factor_format = 'dynamic' , |
|||
packing_RL = True , |
|||
no_normalization = False , |
|||
no_lambda = False , |
|||
norm2_max_iter = 100 , |
|||
norm2_threshold = 1e-6 , |
|||
grad_calc_opt_mode = ParamsFact.EXTERNAL_OPT , |
|||
** | kwargs | ||
) |
Constructor.
fact_constraints | the list of pyfaust.proj.proj_gen or pyfaust.factparams.ConstraintGeneric that define the structure of the pyfaust.fact.hierarchical resulting Faust factors in the same order if is_fact_side_left==False, in the reverse order otherwise. |
stop_crit1 | cf. pyfaust.fact.ParamsHierarchical.__init__ |
stop_crit2 | cf. pyfaust.fact.ParamsHierarchical.__init__ |
is_update_way_R2L | cf. pyfaust.fact.ParamsHierarchical.__init__ |
init_lambda | cf. pyfaust.fact.ParamsHierarchical.__init__ |
step_size | cf. pyfaust.fact.ParamsHierarchical.__init__ |
constant_step_size | cf. pyfaust.fact.ParamsHierarchical.__init__ |
is_fact_side_left | cf. pyfaust.fact.ParamsHierarchical.__init__ |
is_verbose | cf. pyfaust.fact.ParamsHierarchical.__init__ |
factor_format | cf. pyfaust.fact.ParamsHierarchical.__init__ |
packing_RL | cf. pyfaust.fact.ParamsHierarchical.__init__ |
no_normalization | cf. pyfaust.fact.ParamsHierarchical.__init__ |
no_lambda | cf. pyfaust.fact.ParamsHierarchical.__init__ |
norm2_max_iter | cf. pyfaust.fact.ParamsHierarchical.__init__ |
grad_calc_opt_mode | cf. pyfaust.fact.ParamsHierarchical.__init__ |