aboutsummaryrefslogtreecommitdiff
path: root/lib/mining/classifier/stats_interface.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-05-09 21:54:02 +0700
committerShulhan <ms@kilabit.info>2022-05-09 21:54:02 +0700
commit0c9abc1a962955dd0b795a422958c5445145d54c (patch)
tree4bf0369f6469a7c22057a2840c9b1c56de460559 /lib/mining/classifier/stats_interface.go
parentc833f34b716b3aeacfca8f92227ff04cad5d04ae (diff)
downloadpakakeh.go-0c9abc1a962955dd0b795a422958c5445145d54c.tar.xz
all: reformat all codes using gofmt 1.19 (the Go tip)
Diffstat (limited to 'lib/mining/classifier/stats_interface.go')
-rw-r--r--lib/mining/classifier/stats_interface.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/mining/classifier/stats_interface.go b/lib/mining/classifier/stats_interface.go
index a9b60b9a..f780d58b 100644
--- a/lib/mining/classifier/stats_interface.go
+++ b/lib/mining/classifier/stats_interface.go
@@ -4,10 +4,8 @@
package classifier
-//
// ComputeFMeasures given array of precisions and recalls, compute F-measure
// of each instance and return it.
-//
func ComputeFMeasures(precisions, recalls []float64) (fmeasures []float64) {
// Get the minimum length of precision and recall.
// This is to make sure that we are not looping out of range.
@@ -24,13 +22,11 @@ func ComputeFMeasures(precisions, recalls []float64) (fmeasures []float64) {
return
}
-//
// ComputeAccuracies will compute and return accuracy from array of
// true-positive, false-positive, true-negative, and false-negative; using
// formula,
//
// (tp + tn) / (tp + tn + tn + fn)
-//
func ComputeAccuracies(tp, fp, tn, fn []int64) (accuracies []float64) {
// Get minimum length of input, just to make sure we are not looping
// out of range.
@@ -50,10 +46,8 @@ func ComputeAccuracies(tp, fp, tn, fn []int64) (accuracies []float64) {
return
}
-//
// ComputeElapsedTimes will compute and return elapsed time between `start`
// and `end` timestamps.
-//
func ComputeElapsedTimes(start, end []int64) (elaps []int64) {
// Get minimum length.
minlen := len(start)