-
Notifications
You must be signed in to change notification settings - Fork 2
/
OutputVector.java
34 lines (28 loc) · 837 Bytes
/
OutputVector.java
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
31
32
33
34
/*
*This class stores the output of the neural network for each testing image.
* It indicates whether the network was correct, what the network guessed, and what the true value was.
* When an array of OutputVector is created it makes it easier to store and write to a file.
*/
public class OutputVector {
private double expectedOutput;
private int neuralNetOutput;
private boolean correct;
public OutputVector(double expectedOutput, int neuralNetOutput) {
this.expectedOutput = expectedOutput;
this.neuralNetOutput = neuralNetOutput;
if (expectedOutput == neuralNetOutput) {
correct = true;
} else {
correct = false;
}
}
public double getExpectedOutput() {
return expectedOutput;
}
public int getNeuralNetOutput() {
return neuralNetOutput;
}
public boolean getCorrect() {
return correct;
}
}