Skip to content

eliocamp/spfit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spfit

Travis build status

spfit (Single Parameter Fit) is an R implementation of Laurent Boué’s Real numbers, data science and chaos: How to fit any dataset with a single parameter. It can take any data and fit a continuous and differenciable model with just one parameter with arbitrary accuracy:

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("eliocamp/spfit")

Example

Fit the rise of CO2 perfectly with one parameter

library(spfit)
data("co2") 
co2 <- c(co2)

co2_fit <- sp_fit(co2)

co2_pred <- predict(co2_fit)

plot(co2, type = "l")
points(predict(co2_fit), col = "red")

What’s our alpha parameter?

as.character(co2_fit, digits = 30)
#> [1] "0.0416842755182496396583250113637... (1661 more digits)"

About

Single Parameter Fit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages