skwdro.solvers.entropic_dual_torch.solve_dual_wdro#
- skwdro.solvers.entropic_dual_torch.solve_dual_wdro(loss: _DualFormulation, p_hat: Distribution, opt: OptCondTorch)[source]#
Solve the dual problem with the loss-dependant grandient descent algorithm.
- Parameters:
- loss: _DualLoss
Dual loss
- p_hat: Distribution
Empirical distribution
- opt: OptCond
Optimality conditions
- Returns:
- theta: np.ndarray
Concatenated array of the parameters of the model, except the intercept if there is one
- intercept: Optional[np.ndarray]
If the model has specificaly an intercept as one of its parameters, it is stacked in this output tensor
- lambd: Union[np.ndarray, float]
Dual variable \(\lambda\) of the problem
Shapes of input/output tensors.
theta: (n_params,)
intercept: (n_intercepts,) or None
lambd: (1,)