Share via


ISupportSdcaLoss Interface

Definition

The loss function may know the close-form solution to the optimal dual update Ref: Sec(6.2) of http://jmlr.org/papers/volume14/shalev-shwartz13a/shalev-shwartz13a.pdf

public interface ISupportSdcaLoss : Microsoft.ML.Trainers.ILossFunction<float,float>, Microsoft.ML.Trainers.IScalarLoss
type ISupportSdcaLoss = interface
    interface IScalarLoss
    interface ILossFunction<single, single>
Public Interface ISupportSdcaLoss
Implements ILossFunction(Of Single, Single), IScalarLoss
Derived
Implements

Methods

ComputeDualUpdateInvariant(Single)
Derivative(Single, Single)

Derivative of the loss function with respect to output

(Inherited from IScalarLoss)
DualLoss(Single, Single)

The dual loss function for a training example. If f(x) denotes the loss function on an individual training example, then this function returns -f*(-x*), where f*(x*) is the Fenchel conjugate of f(x).

DualUpdate(Single, Single, Single, Single, Int32)

Compute the dual update (\Delta\alpha_i) in SDCA

  • alpha: dual variable at the specified instance
  • lambdaN: L2 const x number of instances
  • cached invariant, hinted by the method above
Loss(TOutput, TLabel)

Computes the loss given the output and the ground truth. Note that the return value has type Double because the loss is usually accumulated over many instances.

(Inherited from ILossFunction<TOutput,TLabel>)

Applies to