1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package de.fu_berlin.ties.eval;
23
24 import java.util.Set;
25
26 import de.fu_berlin.ties.io.StorableContainer;
27
28 /***
29 * A read-only view of multiple {@link de.fu_berlin.ties.eval.FMetrics}
30 * and the sums and averages calculated over them.
31 *
32 * @author Christian Siefkes
33 * @version $Revision: 1.6 $, $Date: 2006/10/21 16:04:11 $, $Author: siefkes $
34 */
35 public interface MultiFMetricsView extends StorableContainer {
36
37 /***
38 * Returns the set of all types (Strings) currently stored in this
39 * instance. The set is immutable and cannot modified.
40 *
41 * @return the set of type names
42 */
43 Set types();
44
45 /***
46 * Returns a read-only view of the {@link FMetrics} of the specified type.
47 * This is not a snapshot but will change whenever the underlying counts
48 * are changed.
49 *
50 * @param type the type to check
51 * @return a view of the counts and evaluation metrics for the given type;
52 * or <code>null</code> if no metrics exist for the given type
53 */
54 FMetricsView view(final String type);
55
56 /***
57 * Returns a read-only view of the {@link FMetrics} containing the sums and
58 * averages over all types. This is not a snapshot but will change whenever
59 * the underlying counts are changed.
60 *
61 * @return a view of the sums and averages over all types
62 */
63 FMetricsView viewAll();
64
65 /***
66 * Optional operation that shows {@link FMetricsSummary statistical
67 * summaries of precision, recall, and F1 metrics} over all types,
68 * if calculated by the used implementation. This is not a snapshot but
69 * will change whenever the underlying values are changed.
70 *
71 * @return a statistical summery over the metrics of all types
72 * @throws UnsupportedOperationException if this method is not supported by
73 * the used implementation
74 */
75 FMetricsSummary viewAllSummary() throws UnsupportedOperationException;
76
77 /***
78 * Optional operation that shows {@link FMetricsSummary statistical
79 * summaries of precision, recall, and F1 metrics} of the specified type,
80 * if calculated by the used implementation. This is not a snapshot but
81 * will change whenever the underlying values are changed.
82 *
83 * @param type the type to check
84 * @return a statistical summery over the metrics of the given type
85 * @throws UnsupportedOperationException if this method is not supported by
86 * the used implementation
87 */
88 FMetricsSummary viewSummary(final String type)
89 throws UnsupportedOperationException;
90
91 }