Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

golearn

> 编程语言
Open source

Machine Learning for Go

9.4K stars0 likes1 views
WebsiteGitHub

About

Machine Learning for Go

GoLearn



GoLearn is a 'batteries included' machine learning library for Go. **Simplicity**, paired with customisability, is the goal. We are in active development, and would love comments from users out in the wild. Drop us a line on Twitter.

twitter: @golearn_ml

Install

See here for installation instructions.

Getting Started

Data are loaded in as Instances. You can then perform matrix like operations on them, and pass them to estimators. GoLearn implements the scikit-learn interface of Fit/Predict, so you can easily swap out estimators for trial and error. GoLearn also includes helper functions for data, like cross validation, and train and test splitting.

…
Iris-virginica	28	2	  56	0.9333	0.9333  0.9333
Iris-setosa	    29	0	  59	1.0000  1.0000	1.0000
Iris-versicolor	27	2	  57	0.9310	0.9310  0.9310
Overall accuracy: 0.9545

Examples

GoLearn comes with practical examples. Dive in and see what is going on.

bash
cd $GOPATH/src/github.com/sjwhitworth/golearn/examples/knnclassifier
go run knnclassifier_iris.go
bash
cd $GOPATH/src/github.com/sjwhitworth/golearn/examples/instances
go run instances.go
bash
cd $GOPATH/src/github.com/sjwhitworth/golearn/examples/trees
go run trees.go

Docs

  • English
  • 中文文档(简体)
  • 中文文档(繁体)

Join the team

Please send me a mail at [email protected]

Issues· 89 open

View all issuesOpen on GitHub
  • #297

    Prediction by trained model

    Updated May 26, 2025
  • #296

    panic when train model with LogisticRegression

    Updated Apr 24, 2025
  • #295

    /linear_models/liblinear.go compilation failure

    Updated Dec 20, 2024
  • #294

    This library is defunct: please correct me if I'm wrong…

    Updated Apr 29, 2024
  • #293

    PCA returns all 0's

    Updated Apr 26, 2024
  • #290

    Update readme cover image

    Updated Dec 23, 2023
  • #288

    Question: Could we save the model and use it next time for reproduction of result?

    Updated Dec 14, 2023
  • #289

    there is a crash in dbscan algoritm

    Updated Nov 3, 2023
  • #286

    KNN.optimisedEuclideanPredict undefined (type *KNNClassifier has no field or method optimisedEuclideanPredict)

    Updated Oct 10, 2023
  • #277

    Any interest in XGBoost?

    Updated Aug 15, 2023

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言