{"id":13413366,"url":"https://github.com/asafschers/goscore","last_synced_at":"2025-03-27T10:32:15.627Z","repository":{"id":57487800,"uuid":"100789050","full_name":"asafschers/goscore","owner":"asafschers","description":"Go Scoring API for PMML","archived":false,"fork":false,"pushed_at":"2019-08-23T11:21:08.000Z","size":139,"stargazers_count":97,"open_issues_count":3,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-07-31T20:52:16.167Z","etag":null,"topics":["classification","decision-trees","golang","machine-learning","pmml","random-forest"],"latest_commit_sha":null,"homepage":null,"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/asafschers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-19T11:08:39.000Z","updated_at":"2024-07-16T07:54:30.000Z","dependencies_parsed_at":"2022-08-29T11:21:39.889Z","dependency_job_id":null,"html_url":"https://github.com/asafschers/goscore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asafschers%2Fgoscore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asafschers%2Fgoscore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asafschers%2Fgoscore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asafschers%2Fgoscore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asafschers","download_url":"https://codeload.github.com/asafschers/goscore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222235883,"owners_count":16953366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["classification","decision-trees","golang","machine-learning","pmml","random-forest"],"created_at":"2024-07-30T20:01:38.693Z","updated_at":"2024-10-30T14:09:25.971Z","avatar_url":"https://github.com/asafschers.png","language":"Go","readme":"[![Build Status](https://travis-ci.org/asafschers/goscore.svg?branch=master)](https://travis-ci.org/asafschers/goscore)\n[![Go Report Card](https://goreportcard.com/badge/github.com/asafschers/goscore)](https://goreportcard.com/report/github.com/asafschers/goscore)\n[![Coverage Status](https://coveralls.io/repos/github/asafschers/goscore/badge.svg?branch=master)](https://coveralls.io/github/asafschers/goscore?branch=master)\n[![GoDoc](https://godoc.org/github.com/asafschers/goscore?status.svg)](https://godoc.org/github.com/asafschers/goscore)\n# Goscore\n\nGo scoring API for Predictive Model Markup Language (PMML).\n\nCurrently supports Neural Network, Decision Tree, Random Forest and Gradient Boosted Models\n\nWill be happy to implement new models by demand, or assist with any other issue.\n\nContact me here or at aschers@gmail.com.\n\n[Tutorial - Deploy Machine Learning Models from R Research to Go Production with PMML](https://medium.com/@aschers/deploy-machine-learning-models-from-r-research-to-ruby-go-production-with-pmml-b41e79445d3d)\n\n## Installation\n\n```\ngo get github.com/asafschers/goscore\n```\n## Usage\n\n### Random Forest / Gradient Boosted Model\n\n[Generate PMML - R](https://github.com/asafschers/scoruby/wiki) \n\nFetch model from PMML file -\n```go\nmodelXml, _ := ioutil.ReadFile(\"fixtures/model.pmml\")\nvar model goscore.RandomForest // or goscore.GradientBoostedModel\nxml.Unmarshal([]byte(modelXml), \u0026model)\n```\n\nSet features -\n```go\nfeatures := map[string]interface{}{\n  \"Sex\": \"male\",\n  \"Parch\": 0,\n  \"Age\": 30,\n  \"Fare\": 9.6875,\n  \"Pclass\": 2,\n  \"SibSp\": 0,\n  \"Embarked\": \"Q\",\n}\n```\n\nScore features by model -\n```go\nscore, _ := model.Score(features, \"1\") // gbm.score doesn't recieve label\n```\n\nScore faster - \n```go\nruntime.GOMAXPROCS(runtime.NumCPU()) // use all cores\nscore, _ := model.ScoreConcurrently(features, \"1\") // parallelize tree traversing  \n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/asafschers/goscore. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","funding_links":[],"categories":["机器学习","Machine Learning","Relational Databases","\u003cspan id=\"机器学习-machine-learning\"\u003e机器学习 Machine Learning\u003c/span\u003e"],"sub_categories":["SQL 查询语句构建库","Search and Analytic Databases","Advanced Console UIs","检索及分析资料库","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasafschers%2Fgoscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasafschers%2Fgoscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasafschers%2Fgoscore/lists"}