{"id":31552363,"url":"https://github.com/yoshoku/numo-optimize","last_synced_at":"2025-10-07T07:06:33.582Z","repository":{"id":317483157,"uuid":"1066887572","full_name":"yoshoku/numo-optimize","owner":"yoshoku","description":"Numo::Optimize provides functions for minimizing objective functions.","archived":false,"fork":false,"pushed_at":"2025-10-03T05:39:03.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T19:53:54.317Z","etag":null,"topics":["gem","lbfgsb","numo","optimization","ruby"],"latest_commit_sha":null,"homepage":"","language":"C","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":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T05:17:54.000Z","updated_at":"2025-10-03T05:10:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7136f6d9-89af-4147-ae44-143d5c44b3fa","html_url":"https://github.com/yoshoku/numo-optimize","commit_stats":null,"previous_names":["yoshoku/numo-optimize"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yoshoku/numo-optimize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-optimize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-optimize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-optimize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-optimize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/numo-optimize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-optimize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542672,"owners_count":26004060,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gem","lbfgsb","numo","optimization","ruby"],"created_at":"2025-10-04T19:53:26.585Z","updated_at":"2025-10-07T07:06:33.577Z","avatar_url":"https://github.com/yoshoku.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numo::Optimize\n\n[![Gem Version](https://badge.fury.io/rb/numo-optimize.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/numo-optimize)\n[![Build Status](https://github.com/yoshoku/numo-optimize/actions/workflows/main.yml/badge.svg)](https://github.com/yoshoku/numo-optimize/actions/workflows/main.yml)\n[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-optimize/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://gemdocs.org/gems/numo-optimize/)\n\nNumo::Optimize (numo-optimize) provides functions for minimizing objective functions.\nThis gem is based on [Lbfgsb.rb](https://github.com/yoshoku/lbfgsb.rb) and\n[mopti](https://github.com/yoshoku/mopti) by the same author.\n\nPlease note that numo-optimize depends on [numo-narray-alt](https://github.com/yoshoku/numo-narray-alt), not Numo::NArray.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add numo-optimize\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```bash\ngem install numo-optimize\n```\n\n## Usage\n\nexample.rb:\n\n```ruby\nrequire 'numo/narray'\nrequire 'numo/optimize'\n\n# Define the objective function.\nobj_func = proc do |x|\n  (x - 3)**2 + 2\nend\n\n# Define the gradient (Jacobian) of the objective function.\ngradient_func = proc do |x|\n  2 * (x - 3)\nend\n\n# Initial guess\nx_init = Numo::DFloat[0.0]\n\n# Perform optimization\nresult = Numo::Optimize.minimize(x_init: x_init, fnc: obj_func, jcb: gradient_func)\n\n# Output the result\nputs \"Optimized parameters: #{result[:x][0]}\"\n```\n\n```sh\n$ ruby example.rb\nOptimized parameters: 3.0\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-optimize.\nThis project is intended to be a safe, welcoming space for collaboration,\nand contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/numo-optimize/blob/main/CODE_OF_CONDUCT.md).\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).\nIn addition, L-BFGS-B carries the following condition for use:\n\nThis software is freely available, but we expect that all publications describing  work using this software ,\nor all commercial products using it, quote at least one of the references given below.\nThis software is released under the \"New BSD License\" (aka \"Modified BSD License\" or \"3-clause license\").\n\n## Code of Conduct\n\nEveryone interacting in the Numo::Optimize project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/numo-optimize/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-optimize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Fnumo-optimize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-optimize/lists"}