From b75b54aab88cf531340b398f8c6aa38411de5c0a Mon Sep 17 00:00:00 2001 From: ss8651twtw Date: Sun, 17 Jun 2018 00:21:58 +0800 Subject: [PATCH] Fix import cycle --- evaluation/cross_fold_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evaluation/cross_fold_test.go b/evaluation/cross_fold_test.go index 708fd6b..15f3171 100644 --- a/evaluation/cross_fold_test.go +++ b/evaluation/cross_fold_test.go @@ -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) })