ST
- The data type of the solution set.WT
- The data type of the workset (the feedback data set).@Deprecated @Public public class DeltaIteration<ST,WT> extends Object
DataSet.iterateDelta(DataSet, int, int...)
method.Modifier and Type | Class and Description |
---|---|
static class |
DeltaIteration.SolutionSetPlaceHolder<ST>
Deprecated.
A
DataSet that acts as a placeholder for the solution set during the iteration. |
static class |
DeltaIteration.WorksetPlaceHolder<WT>
Deprecated.
A
DataSet that acts as a placeholder for the workset during the iteration. |
Constructor and Description |
---|
DeltaIteration(ExecutionEnvironment context,
TypeInformation<ST> type,
DataSet<ST> solutionSet,
DataSet<WT> workset,
Keys<ST> keys,
int maxIterations)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DataSet<ST> |
closeWith(DataSet<ST> solutionSetDelta,
DataSet<WT> newWorkset)
Deprecated.
Closes the delta iteration.
|
AggregatorRegistry |
getAggregators()
Deprecated.
Gets the registry for aggregators for the iteration.
|
DataSet<ST> |
getInitialSolutionSet()
Deprecated.
Gets the initial solution set.
|
DataSet<WT> |
getInitialWorkset()
Deprecated.
Gets the initial workset.
|
ResourceSpec |
getMinResources()
Deprecated.
Gets the minimum resources from this iteration.
|
String |
getName()
Deprecated.
Gets the name from this iteration.
|
int |
getParallelism()
Deprecated.
Gets the iteration's parallelism.
|
ResourceSpec |
getPreferredResources()
Deprecated.
Gets the preferred resources from this iteration.
|
DeltaIteration.SolutionSetPlaceHolder<ST> |
getSolutionSet()
Deprecated.
Gets the solution set of the delta iteration.
|
DeltaIteration.WorksetPlaceHolder<WT> |
getWorkset()
Deprecated.
Gets the working set of the delta iteration.
|
boolean |
isSolutionSetUnManaged()
Deprecated.
gets whether the solution set is in managed or unmanaged memory.
|
DeltaIteration<ST,WT> |
name(String name)
Deprecated.
Sets the name for the iteration.
|
DeltaIteration<ST,WT> |
parallelism(int parallelism)
Deprecated.
Sets the parallelism for the iteration.
|
<X extends Value> |
registerAggregationConvergenceCriterion(String name,
Aggregator<X> aggregator,
ConvergenceCriterion<X> convergenceCheck)
Deprecated.
Registers an
Aggregator for the iteration together with a ConvergenceCriterion . |
DeltaIteration<ST,WT> |
registerAggregator(String name,
Aggregator<?> aggregator)
Deprecated.
Registers an
Aggregator for the iteration. |
void |
setSolutionSetUnManaged(boolean solutionSetUnManaged)
Deprecated.
Sets whether to keep the solution set in managed memory (safe against heap exhaustion) or
unmanaged memory (objects on heap).
|
public DeltaIteration(ExecutionEnvironment context, TypeInformation<ST> type, DataSet<ST> solutionSet, DataSet<WT> workset, Keys<ST> keys, int maxIterations)
public DataSet<ST> closeWith(DataSet<ST> solutionSetDelta, DataSet<WT> newWorkset)
solutionSetDelta
- The delta for the solution set. The delta will be merged into the
solution set at the end of each iteration.newWorkset
- The new workset (feedback data set) that will be fed back to the next
iteration.DataSet.iterateDelta(DataSet, int, int...)
public DataSet<ST> getInitialSolutionSet()
Consider the following example:
DataSet<MyType> solutionSetData = ...;
DataSet<AnotherType> worksetData = ...;
DeltaIteration<MyType, AnotherType> iteration = solutionSetData.iteratorDelta(worksetData, 10, ...);
The solutionSetData would be the data set returned by iteration.getInitialSolutionSet();
.
public DataSet<WT> getInitialWorkset()
Consider the following example:
DataSet<MyType> solutionSetData = ...;
DataSet<AnotherType> worksetData = ...;
DeltaIteration<MyType, AnotherType> iteration = solutionSetData.iteratorDelta(worksetData, 10, ...);
The worksetData would be the data set returned by iteration.getInitialWorkset();
.
public DeltaIteration.SolutionSetPlaceHolder<ST> getSolutionSet()
public DeltaIteration.WorksetPlaceHolder<WT> getWorkset()
public DeltaIteration<ST,WT> name(String name)
name
- The name for the iteration.public String getName()
public DeltaIteration<ST,WT> parallelism(int parallelism)
parallelism
- The parallelism.public int getParallelism()
ExecutionConfig.PARALLELISM_DEFAULT
if not
set.@PublicEvolving public ResourceSpec getMinResources()
@PublicEvolving public ResourceSpec getPreferredResources()
@PublicEvolving public DeltaIteration<ST,WT> registerAggregator(String name, Aggregator<?> aggregator)
Aggregator
for the iteration. Aggregators can be used to maintain simple
statistics during the iteration, such as number of elements processed. The aggregators
compute global aggregates: After each iteration step, the values are globally aggregated to
produce one aggregate that represents statistics across all parallel instances. The value of
an aggregator can be accessed in the next iteration.
Aggregators can be accessed inside a function via the AbstractRichFunction.getIterationRuntimeContext()
method.
name
- The name under which the aggregator is registered.aggregator
- The aggregator class.@PublicEvolving public <X extends Value> DeltaIteration<ST,WT> registerAggregationConvergenceCriterion(String name, Aggregator<X> aggregator, ConvergenceCriterion<X> convergenceCheck)
Aggregator
for the iteration together with a ConvergenceCriterion
. For a general description of aggregators, see registerAggregator(String, Aggregator)
and Aggregator
. At the end of each
iteration, the convergence criterion takes the aggregator's global aggregate value and
decides whether the iteration should terminate. A typical use case is to have an aggregator
that sums up the total error of change in an iteration step and have to have a convergence
criterion that signals termination as soon as the aggregate value is below a certain
threshold.name
- The name under which the aggregator is registered.aggregator
- The aggregator class.convergenceCheck
- The convergence criterion.@PublicEvolving public AggregatorRegistry getAggregators()
public void setSolutionSetUnManaged(boolean solutionSetUnManaged)
solutionSetUnManaged
- True to keep the solution set in unmanaged memory, false to keep
it in managed memory.isSolutionSetUnManaged()
public boolean isSolutionSetUnManaged()
setSolutionSetUnManaged(boolean)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.