-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPi0AlphaBetaCountTuple.java
More file actions
75 lines (49 loc) · 1.49 KB
/
Pi0AlphaBetaCountTuple.java
File metadata and controls
75 lines (49 loc) · 1.49 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import java.io.DataInput;
import java.io.IOException;
import java.io.DataOutput;
import org.apache.hadoop.io.Writable;
public class Pi0AlphaBetaCountTuple implements Writable {
private double pi0 = 0; // proportion of uniform distribution in BUM (true negatives)
private double alpha = 0; // alpha coefficient for the beta distribution in BUM (true positives)
private double beta = 0; // beta coefficient for the beta distribution in BUM (true positives)
private long count = 0; // the number of tuples contributing to this tuple's coefficient average
public double getPi0() {
return this.pi0;
}
public void setPi0(double pi0) {
this.pi0 = pi0;
}
public double getAlpha() {
return this.alpha;
}
public void setAlpha(double alpha) {
this.alpha = alpha;
}
public double getBeta() {
return this.beta;
}
public void setBeta(double beta) {
this.beta = beta;
}
public long getCount() {
return this.count;
}
public void setCount(long count) {
this.count = count;
}
public void readFields(DataInput in) throws IOException {
this.pi0 = in.readDouble();
this.alpha = in.readDouble();
this.beta = in.readDouble();
this.count = in.readLong();
}
public void write(DataOutput out) throws IOException {
out.writeDouble(this.pi0);
out.writeDouble(this.alpha);
out.writeDouble(this.beta);
out.writeLong(this.count);
}
public String toString() {
return "pi0: " + this.pi0 + "\t alpha: " + this.alpha + "\t beta: " + this.beta + "\t count: " + this.count;
}
}