18 int i,
P,
N, TP, FN = 0;
19 float bAccuracy = 0.0;
22 for (P=0, i=0;i<
n;i++)
23 P += (list[i].val == 1? 1 : 0);
34 acc = (TP + N - FN) * 100.0/ (P + N) ;
49 int i,
P, TP, FP, TPprev, FPprev, AUC;
52 FP = TP = FPprev = TPprev = AUC = 0;
53 prev = list[0].key -1;
55 for (P=0, i=0; i<
n; i++)
56 P += (list[i].val == 1 ? 1 : 0);
58 for (i=0; i<n && FP < maxN; i++) {
59 if (list[i].
key != prev) {
60 AUC += (TP+TPprev)*(FP-FPprev)/2;
71 AUC += (TP+TPprev)*(FP-FPprev)/2;
73 return (TP*FP > 0 ? (
float)(1.0*AUC/(P*FP)) : 0.0);
94 for (i=0; i<n && TP < (P+1)/2; i++) {
115 return 1.0 * mean/
n;
128 stdDev += (values[
i] -
mean)* (values[i] - mean);
131 return sqrt(1.0 * stdDev/n);
float ComputeStdDev(int n, float *values)
float ComputeMedianRFP(int n, gk_fkv_t *list)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Point3 mean(const CONTAINER &points)
mean
float ComputeMean(int n, float *values)
float ComputeAccuracy(int n, gk_fkv_t *list)
float ComputeROCn(int n, int maxN, gk_fkv_t *list)