I am trying to fit curve using Spline.
As I studied it, knots and control points are important factor for making curve.
However functions which support to make spline curve, there is no argument on control points. (includes arguments on knots....)
Here functions that I want to use for curve fitting.
bs
and smooth.spline
function in r.
bs (x, df = NULL, knots = NULL, degree = 3, intercept = FALSE, Boundary.knots = range(x))
smooth.spline (x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
all.knots = FALSE, nknots = .nknots.smspl,
keep.data = TRUE, df.offset = 0, penalty = 1,
control.spar = list(), tol = 1e-6 * IQR(x))
Could you explain the relationship between control points and knots?
And how can I determine appropriate number of knots, for my dataset? (coordinates data, cubic spline, want to make trail using spline)
The question might be naive, please answer for naive engineer.
Thanks.