skwdro.solvers.entropic_dual_torch.solve_dual_wdro
- skwdro.solvers.entropic_dual_torch.solve_dual_wdro(loss: _DualLoss, 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
of the problem