pyttb.decompositions.cp.gcp.fg
Evaluate Function And Gradient Handles.
- pyttb.decompositions.cp.gcp.fg.evaluate(model: ktensor, data: ttb.tensor | ttb.sptensor, weights: np.ndarray | None, function_handle: Literal[None], gradient_handle: function_type) list[ndarray] [source]
- pyttb.decompositions.cp.gcp.fg.evaluate(model: ktensor, data: ttb.tensor | ttb.sptensor, weights: np.ndarray | None, function_handle: function_type, gradient_handle: Literal[None]) float
- pyttb.decompositions.cp.gcp.fg.evaluate(model: ktensor, data: ttb.tensor | ttb.sptensor, weights: np.ndarray | None, function_handle: function_type, gradient_handle: function_type) tuple[float, list[ndarray]]
Evaluate an objective function and/or gradient function.
- Parameters:
model – Current decomposition.
data – Source tensor to decompose.
weights – Weighted values for returned tensor. Can be used as a mask.
function_handle – Objective function.
gradient_handle – Gradient definition.
- Returns:
Objective function value and/or gradient function value with respect to model.