Package elki.result
Class EvaluationResult.MeasurementGroup
- java.lang.Object
-
- elki.result.EvaluationResult.MeasurementGroup
-
- All Implemented Interfaces:
java.lang.Iterable<EvaluationResult.Measurement>
- Enclosing class:
- EvaluationResult
public static class EvaluationResult.MeasurementGroup extends java.lang.Object implements java.lang.Iterable<EvaluationResult.Measurement>
A group of evaluation measurements.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
groupname
Group nameprivate java.util.ArrayList<EvaluationResult.Measurement>
measurements
Measurements in this group.
-
Constructor Summary
Constructors Modifier Constructor Description protected
MeasurementGroup(java.lang.String gname)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationResult.MeasurementGroup
addMeasure(java.lang.String name, double val, double min, double max, boolean lowerisbetter)
Add a single measurement.EvaluationResult.MeasurementGroup
addMeasure(java.lang.String name, double val, double min, double max, double exp, boolean lowerisbetter)
Add a single measurement.EvaluationResult.Measurement
getMeasure(java.lang.String name)
Check if a measurement already exists.java.lang.String
getName()
Get the group name.boolean
hasMeasure(java.lang.String name)
Check if a measurement already exists.java.util.Iterator<EvaluationResult.Measurement>
iterator()
-
-
-
Field Detail
-
groupname
private java.lang.String groupname
Group name
-
measurements
private java.util.ArrayList<EvaluationResult.Measurement> measurements
Measurements in this group.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the group name.- Returns:
- Group name
-
addMeasure
public EvaluationResult.MeasurementGroup addMeasure(java.lang.String name, double val, double min, double max, boolean lowerisbetter)
Add a single measurement.- Parameters:
name
- Measurement nameval
- Observed valuemin
- Minimum valuemax
- Maximum valuelowerisbetter
- Flag- Returns:
this
(Builder pattern)
-
addMeasure
public EvaluationResult.MeasurementGroup addMeasure(java.lang.String name, double val, double min, double max, double exp, boolean lowerisbetter)
Add a single measurement.- Parameters:
name
- Measurement nameval
- Observed valuemin
- Minimum valueexp
- Expected valuelowerisbetter
- Flag- Returns:
this
(Builder pattern)
-
hasMeasure
public boolean hasMeasure(java.lang.String name)
Check if a measurement already exists.- Parameters:
name
- Measurement name- Returns:
true
if measurement exists
-
getMeasure
public EvaluationResult.Measurement getMeasure(java.lang.String name)
Check if a measurement already exists.- Parameters:
name
- Measurement name- Returns:
true
if measurement exists
-
iterator
public java.util.Iterator<EvaluationResult.Measurement> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<EvaluationResult.Measurement>
-
-