{"id":19466216,"url":"https://github.com/yoshoku/rumale-svm","last_synced_at":"2025-04-25T09:32:45.835Z","repository":{"id":56893812,"uuid":"216067917","full_name":"yoshoku/rumale-svm","owner":"yoshoku","description":"Rumale::SVM provides support vector machine algorithms of LIBSVM and LIBLINEAR with Rumale interface","archived":false,"fork":false,"pushed_at":"2025-01-02T11:46:17.000Z","size":172,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T19:51:13.553Z","etag":null,"topics":["liblinear","libsvm","machine-learning","ruby","rubyml","rumale","svm"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/rumale-svm","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoshoku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-18T16:44:05.000Z","updated_at":"2025-01-02T11:46:20.000Z","dependencies_parsed_at":"2023-01-31T20:31:49.800Z","dependency_job_id":"232d6e29-76bf-421f-b366-48c8b996b627","html_url":"https://github.com/yoshoku/rumale-svm","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Frumale-svm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Frumale-svm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Frumale-svm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Frumale-svm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/rumale-svm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250790280,"owners_count":21487783,"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":["liblinear","libsvm","machine-learning","ruby","rubyml","rumale","svm"],"created_at":"2024-11-10T18:26:08.114Z","updated_at":"2025-04-25T09:32:45.560Z","avatar_url":"https://github.com/yoshoku.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rumale::SVM\n\n[![Build Status](https://github.com/yoshoku/rumale-svm/workflows/build/badge.svg)](https://github.com/yoshoku/rumale-svm/actions?query=workflow%3Abuild)\n[![Gem Version](https://badge.fury.io/rb/rumale-svm.svg)](https://badge.fury.io/rb/rumale-svm)\n[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/rumale-svm/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/rumale-svm/doc/)\n\nRumale::SVM provides support vector machine algorithms using\n[LIBSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/) and [LIBLINEAR](https://www.csie.ntu.edu.tw/~cjlin/liblinear/)\nwith [Rumale](https://github.com/yoshoku/rumale) interface.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rumale-svm'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rumale-svm\n\n## Documentation\n\n- [Rumale::SVM API Documentation](https://yoshoku.github.io/rumale-svm/doc/)\n\n## Usage\nDownload pendigits dataset from [LIBSVM DATA](https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/) web page.\n\n```sh\n$ wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/pendigits\n$ wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/pendigits.t\n```\n\nTraining linear support vector classifier.\n\n```ruby\nrequire 'rumale/svm'\nrequire 'rumale/dataset'\n\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\nsvc = Rumale::SVM::LinearSVC.new(random_seed: 1)\nsvc.fit(samples, labels)\n\nFile.open('svc.dat', 'wb') { |f| f.write(Marshal.dump(svc)) }\n```\n\nEvaluate classifiction accuracy on testing datase.\n\n```ruby\nrequire 'rumale/svm'\nrequire 'rumale/dataset'\n\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits.t')\nsvc = Marshal.load(File.binread('svc.dat'))\n\nputs \"Accuracy: #{svc.score(samples, labels).round(3)}\"\n```\n\nExecution result.\n\n```sh\n$ ruby rumale_svm_train.rb\n$ ls svc.dat\nsvc.dat\n$ ruby rumale_svm_test.rb\nAccuracy: 0.835\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/rumale-svm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Frumale-svm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Frumale-svm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Frumale-svm/lists"}