[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5086":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":27,"discoverSource":28},5086,"golearn","sjwhitworth\u002Fgolearn","sjwhitworth","Machine Learning for Go","",null,"Go",9438,1172,426,80,0,2,65.41,"MIT License",false,"master",true,[],"2026-06-12 04:00:24","GoLearn\n=======\n\n\u003Cimg src=\"http:\u002F\u002Ftalks.golang.org\u002F2013\u002Fadvconc\u002Fgopherhat.jpg\" width=125>\u003Cbr>\n[![GoDoc](https:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn?status.png)](https:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn)\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002Fsjwhitworth\u002Fgolearn.png?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Fsjwhitworth\u002Fgolearn)\u003Cbr>\n[![Code Coverage](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsjwhitworth\u002Fgolearn\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsjwhitworth\u002Fgolearn)\n\n[![Support via Gittip](https:\u002F\u002Frawgithub.com\u002Ftwolfson\u002Fgittip-badge\u002F0.2.0\u002Fdist\u002Fgittip.png)](https:\u002F\u002Fwww.gittip.com\u002Fsjwhitworth\u002F)\n\nGoLearn is a 'batteries included' machine learning library for Go. **Simplicity**, paired with customisability, is the goal.\nWe are in active development, and would love comments from users out in the wild. Drop us a line on Twitter.\n\ntwitter: [@golearn_ml](http:\u002F\u002Fwww.twitter.com\u002Fgolearn_ml)\n\nInstall\n=======\n\nSee [here](https:\u002F\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn\u002Fwiki\u002FInstallation) for installation instructions.\n\nGetting Started\n=======\n\nData are loaded in as Instances. You can then perform matrix like operations on them, and pass them to estimators.\nGoLearn implements the scikit-learn interface of Fit\u002FPredict, so you can easily swap out estimators for trial and error.\nGoLearn also includes helper functions for data, like cross validation, and train and test splitting.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com\u002Fsjwhitworth\u002Fgolearn\u002Fbase\"\n\t\"github.com\u002Fsjwhitworth\u002Fgolearn\u002Fevaluation\"\n\t\"github.com\u002Fsjwhitworth\u002Fgolearn\u002Fknn\"\n)\n\nfunc main() {\n\t\u002F\u002F Load in a dataset, with headers. Header attributes will be stored.\n\t\u002F\u002F Think of instances as a Data Frame structure in R or Pandas.\n\t\u002F\u002F You can also create instances from scratch.\n\trawData, err := base.ParseCSVToInstances(\"datasets\u002Firis.csv\", true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t\u002F\u002F Print a pleasant summary of your data.\n\tfmt.Println(rawData)\n\n\t\u002F\u002FInitialises a new KNN classifier\n\tcls := knn.NewKnnClassifier(\"euclidean\", \"linear\", 2)\n\n\t\u002F\u002FDo a training-test split\n\ttrainData, testData := base.InstancesTrainTestSplit(rawData, 0.50)\n\tcls.Fit(trainData)\n\n\t\u002F\u002FCalculates the Euclidean distance and returns the most popular label\n\tpredictions, err := cls.Predict(testData)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t\u002F\u002F Prints precision\u002Frecall metrics\n\tconfusionMat, err := evaluation.GetConfusionMatrix(testData, predictions)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"Unable to get confusion matrix: %s\", err.Error()))\n\t}\n\tfmt.Println(evaluation.GetSummary(confusionMat))\n}\n```\n\n```\nIris-virginica\t28\t2\t  56\t0.9333\t0.9333  0.9333\nIris-setosa\t    29\t0\t  59\t1.0000  1.0000\t1.0000\nIris-versicolor\t27\t2\t  57\t0.9310\t0.9310  0.9310\nOverall accuracy: 0.9545\n```\n\nExamples\n========\n\nGoLearn comes with practical examples. Dive in and see what is going on.\n\n```bash\ncd $GOPATH\u002Fsrc\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn\u002Fexamples\u002Fknnclassifier\ngo run knnclassifier_iris.go\n```\n```bash\ncd $GOPATH\u002Fsrc\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn\u002Fexamples\u002Finstances\ngo run instances.go\n```\n```bash\ncd $GOPATH\u002Fsrc\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn\u002Fexamples\u002Ftrees\ngo run trees.go\n```\n\nDocs\n====\n\n * [English](https:\u002F\u002Fgithub.com\u002Fsjwhitworth\u002Fgolearn\u002Fwiki)\n * [中文文档(简体)](doc\u002Fzh_CN\u002FHome.md)\n * [中文文档(繁体)](doc\u002Fzh_TW\u002FHome.md)\n\nJoin the team\n=============\n\nPlease send me a mail at stephenjameswhitworth@gmail.com\n","GoLearn 是一个为 Go 语言设计的机器学习库，旨在提供简单易用且高度可定制的机器学习功能。它支持常见的数据处理操作，如加载、分割数据集，并实现了类似 scikit-learn 的 Fit\u002FPredict 接口，便于用户快速上手并灵活替换不同的模型进行实验。此外，GoLearn 还提供了交叉验证等实用工具来帮助评估模型性能。该项目非常适合需要在 Go 项目中集成机器学习能力的开发者使用，无论是初学者还是有经验的工程师都能从中受益。","2026-06-11 03:02:27","top_language"]