{"id":17039950,"url":"https://github.com/lazywei/lineargo","last_synced_at":"2026-03-17T09:32:06.225Z","repository":{"id":41819597,"uuid":"39900277","full_name":"lazywei/lineargo","owner":"lazywei","description":"LinearGo (Go wrapper for LIBLINEAR): A Library for Large Linear Classification","archived":false,"fork":false,"pushed_at":"2019-12-06T14:13:44.000Z","size":314,"stargazers_count":113,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-08T22:58:37.627Z","etag":null,"topics":["golang","machine-learning","svm"],"latest_commit_sha":null,"homepage":"http://www.csie.ntu.edu.tw/~cjlin/liblinear/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lazywei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-29T15:12:38.000Z","updated_at":"2025-09-11T08:22:35.000Z","dependencies_parsed_at":"2022-09-03T17:00:49.877Z","dependency_job_id":null,"html_url":"https://github.com/lazywei/lineargo","commit_stats":null,"previous_names":["lazywei/liblinear"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lazywei/lineargo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazywei%2Flineargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazywei%2Flineargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazywei%2Flineargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazywei%2Flineargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazywei","download_url":"https://codeload.github.com/lazywei/lineargo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazywei%2Flineargo/sbom","scorecard":{"id":580725,"data":{"date":"2025-08-11","repo":{"name":"github.com/lazywei/lineargo","commit":"5fff9c230babf5abef5b2c5c069572cd7ddf656d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T19:07:17.169Z","repository_id":41819597,"created_at":"2025-08-20T19:07:17.169Z","updated_at":"2025-08-20T19:07:17.169Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30620673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","machine-learning","svm"],"created_at":"2024-10-14T09:08:06.541Z","updated_at":"2026-03-17T09:32:06.199Z","avatar_url":"https://github.com/lazywei.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"LinearGo: LIBLINEAR for Go\n==========\n\n[![Build Status](https://travis-ci.org/lazywei/lineargo.svg?branch=master)](https://travis-ci.org/lazywei/lineargo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lazywei/lineargo)](https://goreportcard.com/report/github.com/lazywei/lineargo)\n\nThis is a Golang wrapper for [LIBLINEAR (C.-J. Lin et al.)](http://ntucsu.csie.ntu.edu.tw/~cjlin/liblinear/) ([GitHub](https://github.com/cjlin1/liblinear)).\nNote that the interface of this package might be slightly different from\nliblinear C interface because of Go convention. Yet, I'll try to align the\nfunction name and functionality to liblinear C library.\n\n**GoDoc**: [Document](https://godoc.org/github.com/lazywei/lineargo).\n\n## Introduction to LIBLINEAR\n\nLIBLINEAR is a linear classifier for data with millions of instances and features. It supports\n\n- L2-regularized classifiers\n- L2-loss linear SVM, L1-loss linear SVM, and logistic regression (LR)\n- L1-regularized classifiers (after version 1.4)\n- L2-loss linear SVM and logistic regression (LR)\n- L2-regularized support vector regression (after version 1.9)\n- L2-loss linear SVR and L1-loss linear SVR.\n\n\n## Install\n\nThis package depends on LIBLINEAR 2.1+ and Go 1.6+. Please install them first via Homebrew or\nother package managers on your OS:\n\n```\nbrew update\nbrew info liblinear # make sure your formula will install version higher than 2.1\nbrew install liblinear\n\nbrew info go # make sure version 1.6+\nbrew install go\n```\n\nAfter liblinear installation, just `go get` this package\n\n```\ngo get github.com/lazywei/lineargo\n```\n\n## Usage\n\n*The package is based on [mat64](https://godoc.org/github.com/gonum/matrix/mat64).*\n\n```go\nimport linear \"github.com/lazywei/lineargo\"\n\n// ReadLibsvm(filepath string, oneBased bool) (X, y *mat64.Dense)\nX, y := linear.ReadLibsvm(\"heart_scale\", true)\n\n// Train(X, y *mat64.Dense, bias float64, solverType int,\n// \tC_, p, eps float64,\n// \tclassWeights map[int]float64) (*Model)\n// Please checkout liblinear's doc for the explanation for these parameters.\nmodel := linear.Train(X, y, -1, linear.L2R_LR, 1.0, 0.1, 0.01, map[int]float64{1: 1, -1: 1})\ny_pred:= linear.Predict(model, X)\n\nfmt.Println(linear.Accuracy(y, y_pred))\n```\n\n## Self-Promotion\n\nThis package is mainly built because of\n[mockingbird](https://github.com/lazywei/mockingbird), which is a programming\nlanguage classifier in Go. Mockingbird is my Google Summer of Code 2015 Project\nwith GitHub and [linguist](https://github.com/github/linguist). If you like it,\nplease feel free to follow linguist, mockingbird, and this library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazywei%2Flineargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazywei%2Flineargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazywei%2Flineargo/lists"}