1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-25 13:48:49 +08:00

Fix import cycle

This commit is contained in:
ss8651twtw 2018-06-17 00:21:58 +08:00
parent c3670402e3
commit b75b54aab8

View File

@ -2,7 +2,7 @@ package evaluation
import (
"github.com/sjwhitworth/golearn/base"
"github.com/sjwhitworth/golearn/trees"
"github.com/sjwhitworth/golearn/knn"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
@ -10,8 +10,8 @@ import (
func TestCrossFold(t *testing.T) {
Convey("Cross Fold Evaluation", t, func() {
iris, _ := base.ParseCSVToInstances("../examples/datasets/iris_headers.csv", true)
tree := trees.NewID3DecisionTree(0.6)
cfs, _ := GenerateCrossFoldValidationConfusionMatrices(iris, tree, 5)
cls := knn.NewKnnClassifier("euclidean", "linear", 2)
cfs, _ := GenerateCrossFoldValidationConfusionMatrices(iris, cls, 5)
Convey("Cross Fold Validation Confusion Matrices", func() {
So(cfs, ShouldNotBeEmpty)
})