diff --git a/extreme_estimator/extreme_models/margin_model/spline_margin_model.py b/extreme_estimator/extreme_models/margin_model/spline_margin_model.py new file mode 100644 index 0000000000000000000000000000000000000000..269e4db6d3ad76ce7498779c8f82af8c6dff02ae --- /dev/null +++ b/extreme_estimator/extreme_models/margin_model/spline_margin_model.py @@ -0,0 +1,12 @@ + +""" +Potentially, we could implement a spline model for the margin, to check results from Gaume + +rbpspline + +Fits a penalized spline with radial basis functions to data + +Examplesn <- 200x <- runif(n)fun <- function(x) sin(3 * pi * x)y <- fun(x) + rnorm(n, 0, sqrt(0.4)) +knots <- quantile(x, prob = 1:(n/4) / (n/4 + 1))fitted <- rbpspline(y, x, knots = knots, degree = 3)fittedplot(x, y)lines(fitted, col = 2) + +""" \ No newline at end of file