-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathClassifier.java
More file actions
30 lines (27 loc) · 1.14 KB
/
Classifier.java
File metadata and controls
30 lines (27 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* This is the interface for a classifier. A classifier only needs
* three methods, one for evaluating examples, one for returning a
* description of the learning algorithm used, and a third for
* returning the "author" of the program. Generally, the actual
* learning will go into the constructer so that the computed
* classifier is returned.
*/
public interface Classifier {
/** A method for predicting the label of a given example <tt>ex</tt>
* represented, as in the rest of the code, as an array of values
* for each of the attributes. The method should return a
* prediction, i.e., 0 or 1.
*/
public int predict(int[] ex);
/** This method should return a very brief but understandable
* description of the learning algorithm that is being used,
* appropriate for posting on the class website.
*/
public String algorithmDescription();
/** This method should return the "author" of this program as you
* would like it to appear on the class website. You can use your
* real name, or a pseudonym, or a name that identifies your
* group.
*/
public String author();
}