pyttb.gcp.fg_setup
Prepare Function and Gradient Handles for GCP OPT.
- pyttb.gcp.fg_setup.setup(objective: Objectives, data: tensor | sptensor | None = None, additional_parameter: float | None = None) Tuple[Callable[[ndarray, ndarray], ndarray], Callable[[ndarray, ndarray], ndarray], float] [source]
Collect the function and gradient handles for GCP.
- Parameters:
objective – Objective function to gather handles for.
data – Tensor to check for consistency with desired objective function.
additional_parameter – Additional constant argument provided to objective function if necessary.
- Returns:
Function handle, gradient handle, and lower bound.
- pyttb.gcp.fg_setup.valid_nonneg(data: tensor | sptensor) bool [source]
Check if provided data is valid non-negative tensor.