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.classify;
23
24 import java.util.Set;
25
26 import de.fu_berlin.ties.ProcessingException;
27 import de.fu_berlin.ties.classify.feature.FeatureVector;
28
29 /***
30 * Classes implementing this interface must be able to classify items
31 * represented by feature vectors.
32 *
33 * @author Christian Siefkes
34 * @version $Revision: 1.6 $, $Date: 2004/04/14 08:45:30 $, $Author: siefkes $
35 */
36 public interface Classifier {
37
38 /***
39 * Base configuration key for classifiers.
40 */
41 String CONFIG_CLASSIFIER = "classifier";
42
43 /***
44 * Classifies an item that is represented by a feature vector by choosing
45 * the most probable class among a set of candidate classes.
46 *
47 * @param features the feature vector to consider
48 * @param candidateClasses an set of classes that are allowed for this item
49 * @return the result of the classification; you can call
50 * {@link PredictionDistribution#best()} to get the most probably class
51 * @throws ProcessingException if an error occurs during classification
52 */
53 PredictionDistribution classify(final FeatureVector features,
54 final Set candidateClasses) throws ProcessingException;
55
56 }