- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrainingSample.java
More file actions
Latest commit
35 lines (30 loc) · 943 Bytes
/
Copy pathTrainingSample.java
File metadata and controls
35 lines (30 loc) · 943 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
/*
* Container class for a training sample (feature array + similarity score).
*
* Copyright (C) 2013 Lisa Vitolo <lisavitolo90@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Creative Commons
* Attribution-NonCommercial-ShareAlike 3.0 license.
* You should have received a copy of the license with this product.
* Otherwise, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
*/
publicclassTrainingSample
{
publicdouble[] features;
publicdoubletarget;
publicTrainingSample(double[] features, doubletarget)
{
this.features = features;
this.target = target;
}
@OverridepublicStringtoString()
{
Strings = "[";
for (inti = 0; i < features.length; i++) {
s += features[i] + ", ";
}
s += "] -> " + target + "\n";
returns;
}
}