Class LinkPredictionMetricParametersReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.links.prediction.metrics.LinkPredictionMetricParametersReader
public class LinkPredictionMetricParametersReader extends ParametersReader
Class for reading contact recommendation metrics.
For each metric, it reads a single configuration.
File format:
metrics:
metric_name:
param1: ...
File format:
metrics:
metric_name:
param1: ...
- See Also:
ParametersReader
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
METRICS
private java.util.Map<java.lang.String,Parameters>
metricsGrid
Metric parameters. -
Constructor Summary
Constructors Constructor Description LinkPredictionMetricParametersReader()
Constructor. -
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>
getMetric()
Gets the set of metrics previously read.Parameters
getParameters(java.lang.String metric)
Gets the grid for a given metricvoid
read(java.util.Map<java.lang.String,java.lang.Object> map)
Obtains the metric parameters for different recommendation metrics.private void
readMetric(java.util.Map.Entry<java.lang.String,java.lang.Object> element)
Reads the parameters for a single metric.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReader
readBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
-
Field Details
-
METRICS
private static final java.lang.String METRICS- See Also:
- Constant Field Values
-
metricsGrid
Metric parameters. A single parameter set for each metric is stored.
-
-
Constructor Details
-
LinkPredictionMetricParametersReader
public LinkPredictionMetricParametersReader()Constructor.
-
-
Method Details
-
read
public void read(java.util.Map<java.lang.String,java.lang.Object> map)Obtains the metric parameters for different recommendation metrics.- Parameters:
map
- the map containing the metric configuration.
-
readMetric
private void readMetric(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the parameters for a single metric.- Parameters:
element
- a map containing the information in the YAML file about the metric.
-
getMetric
public java.util.Set<java.lang.String> getMetric()Gets the set of metrics previously read.- Returns:
- The set of metrics previously read from the grid file.
-
getParameters
Gets the grid for a given metric- Parameters:
metric
- the metric to search- Returns:
- the grid if exists, an empty grid if not.
-