golearn icon indicating copy to clipboard operation
golearn copied to clipboard

Error in download golearn with 'go get'

Open Zijun-Yin opened this issue 1 year ago • 3 comments

Error in download golearn with 'go get ...' (go1.8.4)

$ go get github.com/sjwhitworth/golearn@latest                       
go: github.com/sjwhitworth/[email protected] requires
        github.com/rocketlaunchr/[email protected] requires
        github.com/blend/[email protected]: reading github.com/blend/go-sdk/go.mod at revision v1.1.1: unknown revision v1.1.1

Maybe the vision1.1.1 of go-sdk is too old to use. I don't know how to download now!

Zijun-Yin avatar Aug 11 '22 13:08 Zijun-Yin

See the bug report at dataframe-go;

add this to your go.mod

replace (
	github.com/blend/go-sdk v1.1.1 => github.com/blend/go-sdk legacy-v1.1.1
)

however, there is a new error now that

go: github.com/sjwhitworth/[email protected] requires
	github.com/rocketlaunchr/[email protected] requires
	github.com/cnkei/[email protected]: invalid version: unknown revision 842a72f86331

needing a replace directive involving some research

github.com/cnkei/gospline v0.0.0-20191204072713-842a72f86331 => github.com/cnkei/gospline v0.0.0-20191204052713-d67fac29a294

it seems rocketlaunchr/dataframe-go is a bit unmaintained; could rocketlaunchr/dataframe-go be removed as a dependency from golearn?

MarkieMark avatar Oct 03 '22 08:10 MarkieMark

邮件已收到,谢谢!                  ——赵淼

riverlaker avatar Oct 03 '22 08:10 riverlaker

i will use this command to get this project.

cd ~/go/src
mkdir -p github.com/sjwhitworth
git clone https://github.com/sjwhitworth/golearn.git

update repo vendor

go mod tidy
go mod vendor

to use examples

cd examples/knnclassifier
go build knnclassifier_iris.go
./knnclassifier_iris


Instances with 88 row(s) 1 attribute(s)
Attributes: 
*       CategoricalAttribute("Species", [Iris-setosa Iris-versicolor Iris-virginica])

Data:
        Iris-setosa 
        Iris-virginica 
        Iris-virginica 
        Iris-versicolor 
        Iris-setosa 
        Iris-virginica 
        Iris-setosa 
        Iris-versicolor 
        Iris-setosa 
        Iris-setosa 
        Iris-versicolor 
        Iris-versicolor 
        Iris-versicolor 
        Iris-setosa 
        Iris-virginica 
        Iris-setosa 
        Iris-setosa 
        Iris-setosa 
        Iris-virginica 
        Iris-versicolor 
        Iris-setosa 
        Iris-setosa 
        Iris-versicolor 
        Iris-versicolor 
        Iris-virginica 
        Iris-virginica 
        Iris-setosa 
        Iris-virginica 
        Iris-versicolor 
        Iris-virginica 
        ...
58 row(s) undisplayed
Reference Class True Positives  False Positives True Negatives  Precision       Recall  F1 Score
--------------- --------------  --------------- --------------  ---------       ------  --------
Iris-versicolor 27              1               58              0.9643          0.9310  0.9474
Iris-setosa     30              0               58              1.0000          1.0000  1.0000
Iris-virginica  28              2               57              0.9333          0.9655  0.9492
Overall accuracy: 0.9659

liuguiyangnwpu avatar Nov 14 '22 13:11 liuguiyangnwpu