{"id":19338736,"url":"https://github.com/binroot/curvefitter","last_synced_at":"2025-04-23T01:31:29.480Z","repository":{"id":20664125,"uuid":"23946538","full_name":"BinRoot/CurveFitter","owner":"BinRoot","description":"Regression analysis algorithms from ImageJ1 for easy use on Android and native Java","archived":false,"fork":false,"pushed_at":"2014-09-12T04:17:15.000Z","size":132,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T06:22:11.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinRoot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-12T04:17:01.000Z","updated_at":"2024-04-09T09:26:54.000Z","dependencies_parsed_at":"2022-09-03T11:41:48.612Z","dependency_job_id":null,"html_url":"https://github.com/BinRoot/CurveFitter","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/BinRoot%2FCurveFitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinRoot%2FCurveFitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinRoot%2FCurveFitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinRoot%2FCurveFitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinRoot","download_url":"https://codeload.github.com/BinRoot/CurveFitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352315,"owners_count":21416469,"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":[],"created_at":"2024-11-10T03:18:32.942Z","updated_at":"2025-04-23T01:31:29.174Z","avatar_url":"https://github.com/BinRoot.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Curve Fitter\n============\n\nA fork of [ImageJ CurveFitter](https://github.com/imagej/imagej1) without any `java.awt` or GUI dependencies.\n\nImport this library into an Android (i.e. Java) project to use various regression algorithms, such as:\n\n- **Straight Line:** y = a + bx\n- **2nd Degree Polynomial:** y = a + bx + cx^2\n- **3rd Degree Polynomial:** y = a + bx + cx^2 + dx^3\n- **4th Degree Polynomial:** y = a + bx + cx^2 + dx^3 + ex^4\n- **Exponential:** y = a * exp(bx)\n- **Power:** y = a * x^b\n- **Log:** y = a * ln(bx)\n- **Rodbard:** y = d + (a - d)/(1 + (x/c)^b)\n- **Gamma Variate:** y = b * (x - a)^c * exp(-(x - a)/d)\n- **Log with offset:** y = a + b * ln(x - c)\n- **Rodbard (NIH Image):** x = d + (a - d)/(1 + (y/c)^b), or y = c * ((x - a)/(d - x))^(1/b)]\n- **Exponential with Offset:** y = a * exp(-bx) + c\n- **Gaussian:** y = a + (b - a) * exp(-(x - c)*(x - c)/(2 * d * d))\n- **Exponential Recovery:** y = a * (1 - exp(-b * x)) + c\n- **Inverse Rodbard:** y = c * ((x - a)/(d - x))^(1/b)\n- **Exponential (linear regression):** y = a * exp(bx)\n- **Power (linear regression):** y = a * x^b\n- **5th Degree Polynomial:** y = a + bx + cx^2 + dx^3 + ex^4 + fx^5\n- **6th Degree Polynomial:** y = a + bx + cx^2 + dx^3 + ex^4 + fx^5 + gx^6\n- **7th Degree Polynomial:** y = a + bx + cx^2 + dx^3 + ex^4 + fx^5 + gx^6 + hx^7\n- **8th Degree Polynomial:** y = a + bx + cx^2 + dx^3 + ex^4 + fx^5 + gx^6 + hx^7 + ix^8\n- **Gaussian (no offset):** y = a * exp(-(x - b)*(x - b)/(2 * c * c)))\n- **Exponential Recovery (no offset):** y = a * (1 - exp(-b * x))\n- **Chapman-Richards:** y = a * (1 - exp(-b * x))^c\n\n\nUsage\n=====\n\n```java\ndouble[] xs = {1, 2, 3, 4, 5, 6};\ndouble[] ys = {-2, 0, 6, 16, 30, 48};\nCurveFitter curveFitter = new CurveFitter(xs, ys);\ncurveFitter.doFit(CurveFitter.POLY2);\ndouble[] params = curveFitter.getParams();\n\ndouble a = params[0];\ndouble b = params[1];\ndouble c = params[2];\n// y = a + bx + cx^2\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinroot%2Fcurvefitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinroot%2Fcurvefitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinroot%2Fcurvefitter/lists"}