-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment3Part4.java
More file actions
48 lines (38 loc) · 1.22 KB
/
Assignment3Part4.java
File metadata and controls
48 lines (38 loc) · 1.22 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package assignment3part4;
import java.io.IOException;
import java.util.Arrays;
/**
*
* @author JOHN
*/
public class Assignment3Part4 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// String string = "male";
// byte[] integer = string.getBytes();
// string = integer.toString();
//
// System.out.println(string);
NeuralNetwork network = new NeuralNetwork();
try
{
//load training data
network.loadTrainingData("trainingFile.txt");
//set parameters of network
network.setParameters(3, 1000, 2376, .7);
//3, 3000, 2376, .7 works well. 5 out of 20% error
//network.setParameters(5, 2500, 2376, .7); 9 out of 20%
//network.setParameters(5, 2500, 2376, .65); 6 out of 20%
//train network
network.train();
network.validate("validationFile.txt");
//test network
//network.testData("inputFile.txt", "outputFile.txt");
} catch (IOException e)
{
System.out.println(e);
}
}
}