public abstract class AbstractIterativeRanker extends AbstractRanker
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractIterativeRanker.UniformIncident |
protected static class |
AbstractIterativeRanker.UniformOut |
Modifier and Type | Field and Description |
---|---|
protected int |
max_iterations |
protected NumberVertexValue |
priors |
protected double |
tolerance |
protected static EdgeVertexNumberFunction |
UNIFORM_INCIDENT |
protected static NumberEdgeValue |
UNIFORM_OUT |
edge_value, graph, UNIT_VALUE
Constructor and Description |
---|
AbstractIterativeRanker(ArchetypeGraph g,
int max_iterations,
double tolerance) |
AbstractIterativeRanker(ArchetypeGraph g,
NumberEdgeValue edge_value,
int max_iterations,
double tolerance) |
AbstractIterativeRanker(ArchetypeGraph g,
NumberVertexValue priors,
int max_iterations,
double tolerance) |
AbstractIterativeRanker(ArchetypeGraph g,
NumberVertexValue priors,
NumberEdgeValue edge_value,
int max_iterations,
double tolerance) |
Modifier and Type | Method and Description |
---|---|
protected static NumberVertexValue |
getNormalizedInitialValues(ArchetypeGraph g)
Returns
NumberVertexValue with uniformly distributed values
such that their sum, over all vertices in g , is 1. |
protected static NumberVertexValue |
getNormalizedInitialValues(ArchetypeGraph graph,
boolean squared)
Returns
NumberVertexValue with uniformly distributed values
such that their sum (of their squares if squared is
true ) over all vertices in g is 1. |
double |
getToleranceValue(double cur_tolerance,
NumberVertexValue old_value,
NumberVertexValue new_value)
Returns the maximum of largest single difference between any value in
old_value and the corresponding value in
new_value . |
protected boolean |
hasConverged(ArchetypeVertex v,
NumberVertexValue first,
NumberVertexValue second) |
normalizeValues, normalizeValues
protected static final NumberEdgeValue UNIFORM_OUT
protected static final EdgeVertexNumberFunction UNIFORM_INCIDENT
protected NumberVertexValue priors
protected int max_iterations
protected double tolerance
public AbstractIterativeRanker(ArchetypeGraph g, int max_iterations, double tolerance)
public AbstractIterativeRanker(ArchetypeGraph g, NumberVertexValue priors, int max_iterations, double tolerance)
public AbstractIterativeRanker(ArchetypeGraph g, NumberEdgeValue edge_value, int max_iterations, double tolerance)
public AbstractIterativeRanker(ArchetypeGraph g, NumberVertexValue priors, NumberEdgeValue edge_value, int max_iterations, double tolerance)
public double getToleranceValue(double cur_tolerance, NumberVertexValue old_value, NumberVertexValue new_value)
old_value
and the corresponding value in
new_value
.
Override this if you want to calculate the tolerance value in a
different way (e.g., mean difference over all vertices).cur_tolerance
- old_value
- new_value
- protected boolean hasConverged(ArchetypeVertex v, NumberVertexValue first, NumberVertexValue second)
protected static NumberVertexValue getNormalizedInitialValues(ArchetypeGraph graph, boolean squared)
NumberVertexValue
with uniformly distributed values
such that their sum (of their squares if squared
is
true
) over all vertices in g
is 1.protected static NumberVertexValue getNormalizedInitialValues(ArchetypeGraph g)
NumberVertexValue
with uniformly distributed values
such that their sum, over all vertices in g
, is 1.