{"id":16277096,"url":"https://github.com/eliocamp/spfit","last_synced_at":"2025-04-08T17:20:01.394Z","repository":{"id":84292356,"uuid":"206168761","full_name":"eliocamp/spfit","owner":"eliocamp","description":"Single Parameter Fit","archived":false,"fork":false,"pushed_at":"2019-09-05T17:45:07.000Z","size":297,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-14T13:40:38.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliocamp.png","metadata":{"files":{"readme":"README.Rmd","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,"governance":null}},"created_at":"2019-09-03T20:42:55.000Z","updated_at":"2022-11-20T20:31:39.000Z","dependencies_parsed_at":"2023-03-04T22:30:44.334Z","dependency_job_id":null,"html_url":"https://github.com/eliocamp/spfit","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"c830536fb7a83cd95372490145a9fa15a21ff4a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspfit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspfit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspfit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspfit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliocamp","download_url":"https://codeload.github.com/eliocamp/spfit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888568,"owners_count":21013002,"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-10-10T18:52:35.613Z","updated_at":"2025-04-08T17:20:01.370Z","avatar_url":"https://github.com/eliocamp.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# spfit\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/eliocamp/spfit.svg?branch=master)](https://travis-ci.org/eliocamp/spfit)\n\u003c!-- badges: end --\u003e\n\nspfit (**S**ingle **P**arameter Fit) is an R implementation of Laurent Boué's [Real numbers, data science and chaos: How to fit any dataset with a single parameter](https://arxiv.org/abs/1904.12320). It can take any data and fit a continuous and differenciable model with just one parameter with arbitrary accuracy:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"man/figures/formula.png\" /\u003e\n\u003c/p\u003e\n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"eliocamp/spfit\")\n```\n\n\u003c!-- the released version of spfit from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"spfit\")\n```\n--\u003e \n\n \n## Example\n\nFit the rise of CO2 perfectly with one parameter\n```{r example}\nlibrary(spfit)\ndata(\"co2\") \nco2 \u003c- c(co2)\n\nco2_fit \u003c- sp_fit(co2)\n\nco2_pred \u003c- predict(co2_fit)\n\nplot(co2, type = \"l\")\npoints(predict(co2_fit), col = \"red\")\n```\n\nWhat's our alpha parameter?\n\n```{r}\nas.character(co2_fit, digits = 30)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fspfit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliocamp%2Fspfit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fspfit/lists"}