{"id":42628040,"url":"https://github.com/vinhkhuc/lbfgs4j","last_synced_at":"2026-01-29T05:07:32.176Z","repository":{"id":33399253,"uuid":"37044387","full_name":"vinhkhuc/lbfgs4j","owner":"vinhkhuc","description":"Java version of liblbfgs: http://www.chokkan.org/software/liblbfgs/","archived":false,"fork":false,"pushed_at":"2020-12-16T01:39:26.000Z","size":34,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T22:49:14.221Z","etag":null,"topics":["java","machine-learning","optimization"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/vinhkhuc.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-06-08T03:41:13.000Z","updated_at":"2025-05-23T08:44:23.000Z","dependencies_parsed_at":"2022-09-12T19:50:44.052Z","dependency_job_id":null,"html_url":"https://github.com/vinhkhuc/lbfgs4j","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vinhkhuc/lbfgs4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhkhuc%2Flbfgs4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhkhuc%2Flbfgs4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhkhuc%2Flbfgs4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhkhuc%2Flbfgs4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinhkhuc","download_url":"https://codeload.github.com/vinhkhuc/lbfgs4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhkhuc%2Flbfgs4j/sbom","scorecard":{"id":922423,"data":{"date":"2025-08-11","repo":{"name":"github.com/vinhkhuc/lbfgs4j","commit":"92ef28ebc9ad18838304af61727761bfee64e5e4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/23 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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-25T05:38:41.615Z","repository_id":33399253,"created_at":"2025-08-25T05:38:41.615Z","updated_at":"2025-08-25T05:38:41.615Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28863184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":["java","machine-learning","optimization"],"created_at":"2026-01-29T05:07:31.495Z","updated_at":"2026-01-29T05:07:32.165Z","avatar_url":"https://github.com/vinhkhuc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a direct Java port of [liblbfgs](http://www.chokkan.org/software/liblbfgs/), a library of \u003cstrong\u003eLimited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)\u003c/strong\u003e.\n\nThe L-BFGS optimization method is used to solve unconstrained minimization problem:\n\u003cp\u003e\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\nminimize f(x), where x = (x1, x2, ... xn) \u003cbr\u003e\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\nf(x) and its gradient are computable.\n\u003c/p\u003e\n\nThis library also includes the implementation of the \u003cstrong\u003eOrthant-Wise Limited-memory Quasi-Newton (OWL-QN) \u003c/strong\u003e method which is used to minimize the function f(x) + C|x|, where C is a positive number.\n\n### Maven dependency\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.vinhkhuc\u003c/groupId\u003e\n  \u003cartifactId\u003elbfgs4j\u003c/artifactId\u003e\n  \u003cversion\u003e0.2.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Usage example\nFind the minimum value of the function f(x) = (x-5)^2 + 1.\n```java\nimport com.github.lbfgs4j.liblbfgs.Function;\nimport com.github.lbfgs4j.LbfgsMinimizer;\n...\n\nFunction f = new Function() {\n  public int getDimension() {\n    return 1;\n  }\n  public double valueAt(double[] x) {\n    return Math.pow(x[0]-5, 2) + 1;\n  }\n  public double[] gradientAt(double[] x) {\n    return new double[] { 2*(x[0]-5) };\n  }\n};\n\nLbfgsMinimizer minimizer = new LbfgsMinimizer();\ndouble[] x = minimizer.minimize(f); // x should be [5]\ndouble min = f.valueAt(x);          // min should be 1\n```\n\nThe OWL-QN method will be used when initializing the minimizer with, for example, ```new LbfgsMinimizer(1.0)```, here 1.0 is the coefficient for |x|.\n\nOther parameters such as memory size, maximum number of iterations, etc. can be set using the class ```LBFGS_Param```. \n\n### License\n\nlbfgs4j is released under the MIT License (see the LICENSE file for details).\n\n### References\n\nThis library is used in several projects:\n1. Moment-Based Quantile Sketches for Efficient High Cardinality Aggregation Queries. Edward Gan, Jialin Ding, Kai Sheng Tai, Vatsal Sharan, Peter Bailis. VLDB 2018. ([paper](https://dl.acm.org/doi/10.14778/3236187.3236212))\n2. Humio, Log Management at Scale. ([acknowledgement](https://docs.humio.com/third-party-licenses/))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinhkhuc%2Flbfgs4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinhkhuc%2Flbfgs4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinhkhuc%2Flbfgs4j/lists"}