pyFM.optimize.base_functions¶
Functions
|
Compute the LB commutativity constraint |
|
Compute the gradient of the LB commutativity constraint |
|
Compute the descriptor preservation constraint |
|
Compute the gradient of the descriptor preservation constraint |
|
Evaluation of the energy for standard FM computation |
|
Evaluation of the gradient of the energy for standard FM computation |
|
Compute the operator commutativity constraint. |
|
Compute the gradient of the operator commutativity constraint. |
|
Compute the operator commutativity constraint for a list of pairs of operators Can be used with a list of descriptor multiplication operator |
|
Compute the gradient of the operator commutativity constraint for a list of pairs of operators Can be used with a list of descriptor multiplication operator |
- pyFM.optimize.base_functions.descr_preservation(C, descr1_red, descr2_red)¶
Compute the descriptor preservation constraint
- Parameters:
C – (K2,K1) Functional map
descr1 – (K1,p) descriptors on first basis
descr2 – (K2,p) descriptros on second basis
- Returns:
energy – descriptor preservation squared norm
- Return type:
float
- pyFM.optimize.base_functions.descr_preservation_grad(C, descr1_red, descr2_red)¶
Compute the gradient of the descriptor preservation constraint
- Parameters:
C – (K2,K1) Functional map
descr1 – (K1,p) descriptors on first basis
descr2 – (K2,p) descriptros on second basis
- Returns:
gradient – gradient of the descriptor preservation squared norm
- Return type:
np.ndarray
- pyFM.optimize.base_functions.LB_commutation(C, ev_sqdiff)¶
Compute the LB commutativity constraint
- Parameters:
C – (K2,K1) Functional map
ev_sqdiff – (K2,K1) [normalized] matrix of squared eigenvalue differences
- Returns:
energy – (float) LB commutativity squared norm
- Return type:
float
- pyFM.optimize.base_functions.LB_commutation_grad(C, ev_sqdiff)¶
Compute the gradient of the LB commutativity constraint
- Parameters:
C – (K2,K1) Functional map
ev_sqdiff – (K2,K1) [normalized] matrix of squared eigenvalue differences
- Returns:
gradient – (K2,K1) gradient of the LB commutativity squared norm
- Return type:
np.ndarray
- pyFM.optimize.base_functions.op_commutation(C, op1, op2)¶
Compute the operator commutativity constraint. Can be used with descriptor multiplication operator
- Parameters:
C – (K2,K1) Functional map
op1 – (K1,K1) operator on first basis
op2 – (K2,K2) descriptros on second basis
- Returns:
energy – (float) operator commutativity squared norm
- Return type:
float
- pyFM.optimize.base_functions.op_commutation_grad(C, op1, op2)¶
Compute the gradient of the operator commutativity constraint. Can be used with descriptor multiplication operator
- Parameters:
C – (K2,K1) Functional map
op1 – (K1,K1) operator on first basis
op2 – (K2,K2) descriptros on second basis
- Returns:
gardient – (K2,K1) gradient of the operator commutativity squared norm
- Return type:
np.ndarray
- pyFM.optimize.base_functions.oplist_commutation(C, op_list)¶
Compute the operator commutativity constraint for a list of pairs of operators Can be used with a list of descriptor multiplication operator
- Parameters:
C – (K2,K1) Functional map
op_list – list of tuple( (K1,K1), (K2,K2) ) operators on first and second basis
- Returns:
energy – (float) sum of operators commutativity squared norm
- Return type:
float
- pyFM.optimize.base_functions.oplist_commutation_grad(C, op_list)¶
Compute the gradient of the operator commutativity constraint for a list of pairs of operators Can be used with a list of descriptor multiplication operator
- Parameters:
C – (K2,K1) Functional map
op_list – list of tuple( (K1,K1), (K2,K2) ) operators on first and second basis
- Returns:
gradient – (K2,K1) gradient of the sum of operators commutativity squared norm
- Return type:
np.ndarray
- pyFM.optimize.base_functions.energy_func_std(C, descr_mu, lap_mu, descr_comm_mu, orient_mu, descr1_red, descr2_red, list_descr, orient_op, ev_sqdiff)¶
Evaluation of the energy for standard FM computation
Parameters:¶
- C :
(K2*K1) or (K2,K1) Functional map
- descr_mu :
scaling of the descriptor preservation term
- lap_mu :
scaling of the laplacian commutativity term
- descr_comm_mu :
scaling of the descriptor commutativity term
- orient_mu :
scaling of the orientation preservation term
- descr1 :
(K1,p) descriptors on first basis
- descr2 :
(K2,p) descriptros on second basis
- list_descr :
- p-uple( (K1,K1), (K2,K2) ) operators on first and second basis
related to descriptors.
- orient_op :
- p-uple( (K1,K1), (K2,K2) ) operators on first and second basis
related to orientation preservation operators.
- ev_sqdiff :
(K2,K1) [normalized] matrix of squared eigenvalue differences
- returns:
energy – value of the energy
- rtype:
float
- pyFM.optimize.base_functions.grad_energy_std(C, descr_mu, lap_mu, descr_comm_mu, orient_mu, descr1_red, descr2_red, list_descr, orient_op, ev_sqdiff)¶
Evaluation of the gradient of the energy for standard FM computation
Parameters:¶
- C :
(K2*K1) or (K2,K1) Functional map
- descr_mu :
scaling of the descriptor preservation term
- lap_mu :
scaling of the laplacian commutativity term
- descr_comm_mu :
scaling of the descriptor commutativity term
- orient_mu :
scaling of the orientation preservation term
- descr1 :
(K1,p) descriptors on first basis
- descr2 :
(K2,p) descriptros on second basis
- list_descr :
- p-uple( (K1,K1), (K2,K2) ) operators on first and second basis
related to descriptors.
- orient_op :
- p-uple( (K1,K1), (K2,K2) ) operators on first and second basis
related to orientation preservation operators.
- ev_sqdiff :
(K2,K1) [normalized] matrix of squared eigenvalue differences
- returns:
gradient – (K2*K1) - value of the energy
- rtype:
float