@Operator public final class SdcaOptimizer extends PrimitiveOp
linear models with L1 + L2 regularization. As global optimization objective is strongly-convex, the optimizer optimizes the dual objective at each step. The optimizer applies each update one example at a time. Examples are sampled uniformly, and the optimizer is learning rate free and enjoys linear convergence rate.
[Proximal Stochastic Dual Coordinate Ascent](http://arxiv.org/pdf/1211.2717v1.pdf).
Shai Shalev-Shwartz, Tong Zhang. 2012
$$Loss Objective = \sum f_{i} (wx_{i}) + (l2 / 2) * |w|^2 + l1 * |w|$$
[Adding vs. Averaging in Distributed Primal-Dual Optimization](http://arxiv.org/abs/1502.03508).
Chenxin Ma, Virginia Smith, Martin Jaggi, Michael I. Jordan,
Peter Richtarik, Martin Takac. 2015
[Stochastic Dual Coordinate Ascent with Adaptive Probabilities](https://arxiv.org/abs/1502.08053).
Dominik Csiba, Zheng Qu, Peter Richtarik. 2015
| Modifier and Type | Class and Description |
|---|---|
static class |
SdcaOptimizer.Options
Optional attributes for
SdcaOptimizer |
operation| Modifier and Type | Method and Description |
|---|---|
static SdcaOptimizer.Options |
adaptative(Boolean adaptative) |
static SdcaOptimizer |
create(Scope scope,
Iterable<Operand<Long>> sparseExampleIndices,
Iterable<Operand<Long>> sparseFeatureIndices,
Iterable<Operand<Float>> sparseFeatureValues,
Iterable<Operand<Float>> denseFeatures,
Operand<Float> exampleWeights,
Operand<Float> exampleLabels,
Iterable<Operand<Long>> sparseIndices,
Iterable<Operand<Float>> sparseWeights,
Iterable<Operand<Float>> denseWeights,
Operand<Float> exampleStateData,
String lossType,
Float l1,
Float l2,
Long numLossPartitions,
Long numInnerIterations,
SdcaOptimizer.Options... options)
Factory method to create a class to wrap a new SdcaOptimizer operation to the graph.
|
List<Output<Float>> |
outDeltaDenseWeights()
a list of vectors where the values are the delta
weights associated with a dense feature group.
|
List<Output<Float>> |
outDeltaSparseWeights()
a list of vectors where each value is the delta
weights associated with a sparse feature group.
|
Output<Float> |
outExampleStateData()
a list of vectors containing the updated example state
data.
|
equals, hashCode, toStringpublic static SdcaOptimizer create(Scope scope, Iterable<Operand<Long>> sparseExampleIndices, Iterable<Operand<Long>> sparseFeatureIndices, Iterable<Operand<Float>> sparseFeatureValues, Iterable<Operand<Float>> denseFeatures, Operand<Float> exampleWeights, Operand<Float> exampleLabels, Iterable<Operand<Long>> sparseIndices, Iterable<Operand<Float>> sparseWeights, Iterable<Operand<Float>> denseWeights, Operand<Float> exampleStateData, String lossType, Float l1, Float l2, Long numLossPartitions, Long numInnerIterations, SdcaOptimizer.Options... options)
scope - current graph scopesparseExampleIndices - a list of vectors which contain example indices.sparseFeatureIndices - a list of vectors which contain feature indices.sparseFeatureValues - a list of vectors which contains feature value
associated with each feature group.denseFeatures - a list of matrices which contains the dense feature values.exampleWeights - a vector which contains the weight associated with each
example.exampleLabels - a vector which contains the label/target associated with each
example.sparseIndices - a list of vectors where each value is the indices which has
corresponding weights in sparse_weights. This field maybe omitted for the
dense approach.sparseWeights - a list of vectors where each value is the weight associated with
a sparse feature group.denseWeights - a list of vectors where the values are the weights associated
with a dense feature group.exampleStateData - a list of vectors containing the example state data.lossType - Type of the primal loss. Currently SdcaSolver supports logistic,
squared and hinge losses.l1 - Symmetric l1 regularization strength.l2 - Symmetric l2 regularization strength.numLossPartitions - Number of partitions of the global loss function.numInnerIterations - Number of iterations per mini-batch.options - carries optional attributes valuespublic static SdcaOptimizer.Options adaptative(Boolean adaptative)
adaptative - Whether to use Adaptive SDCA for the inner loop.public Output<Float> outExampleStateData()
public List<Output<Float>> outDeltaSparseWeights()
Copyright © 2015–2019. All rights reserved.