-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataset.java
More file actions
38 lines (32 loc) · 869 Bytes
/
Dataset.java
File metadata and controls
38 lines (32 loc) · 869 Bytes
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
/*
* 作成日: 2004/01/18
* $Id: Dataset.java,v 1.2 2004/01/18 23:41:34 matsu Exp $
*/
/**
* @author matsu
*
* ニューラルネットワークへ渡すデータセット
*/
public class Dataset {
private double[] input;
private double[] teach;
public double getInput(int i) {
return input[i];
}
public double getTech(int i) {
return teach[i];
}
public Dataset(double[] input) {
this.input = new double[input.length];
for (int i = 0; i < input.length; i++)
this.input[i] = input[i];
}
public Dataset(double[] input, double[] teach) {
this.input = new double[input.length];
this.teach = new double[teach.length];
for (int i = 0; i < input.length; i++)
this.input[i] = input[i];
for (int t = 0; t < teach.length; t++)
this.teach[t] = teach[t];
}
}