View Javadoc

1   package types;
2   
3   public class ClassificationInstance {
4   
5   	public SparseVector x;
6   	public int y;
7   
8   	public Alphabet xAlphabet;
9   	public Alphabet yAlphabet;
10  
11  	public ClassificationInstance(Alphabet xAlphabet, Alphabet yAlphabet,
12  			SparseVector x, Object y) {
13  		this.xAlphabet = xAlphabet;
14  		this.yAlphabet = yAlphabet;
15  		this.x = x;
16  		this.y = yAlphabet.lookupObject(y);
17  	}
18  
19  	@Override
20  	public String toString() {
21  		return y + ": " + x.toString();
22  	}
23  
24  }