pyttb.gcp.fg
Evaluate Function And Gradient Handles.
- pyttb.gcp.fg.evaluate(model: ktensor, data: tensor | sptensor, weights: ndarray | None, function_handle: Literal[None], gradient_handle: Callable[[ndarray, ndarray], ndarray]) List[ndarray] [source]
- pyttb.gcp.fg.evaluate(model: ktensor, data: tensor | sptensor, weights: ndarray | None, function_handle: Callable[[ndarray, ndarray], ndarray], gradient_handle: Literal[None]) float
- pyttb.gcp.fg.evaluate(model: ktensor, data: tensor | sptensor, weights: ndarray | None, function_handle: Callable[[ndarray, ndarray], ndarray], gradient_handle: Callable[[ndarray, ndarray], ndarray]) 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.