-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The creation of the sparse spline basis is relatively slow ... Even the splines package does a better job:
x = rnorm(1000000)
knots = cpsp::createKnots(x, 20, 3)
microbenchmark::microbenchmark(
"cpsp dense" = cpsp::createSplineBasis(x, 3, knots),
"cpsp sparse" = cpsp::createSparseSplineBasis(x, 3, knots),
"splines" = splines::splineDesign(knots, x, 3),
times = 10L
)
Unit: milliseconds
expr min lq mean median uq max neval
cpsp dense 199.2278 202.1108 214.4688 212.5961 223.2443 247.3064 10
cpsp sparse 660.2923 670.0172 706.4031 698.2099 729.9389 778.1298 10
splines 411.2596 422.8083 465.0356 436.3086 480.1230 582.4038 10Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels