Nothing
test_that("lasso and slope fits are equivalent if all lambda are equal", {
set.seed(1)
xy <- SLOPE:::randomProblem(100, 10)
x <- xy$x
y <- xy$y
lambda <- 0.6
library(glmnet)
glmnet.control(fdev = 0)
lasso <- glmnet(x, y, lambda = 0.6, standardize = FALSE)
lasso_coef <- as.vector(coef(lasso))
slope <- SLOPE(
x,
y,
center = FALSE,
scale = FALSE,
lambda = rep(lambda, ncol(x)),
alpha = 1
)
slope_coef <- coef(slope)
expect_equivalent(lasso_coef, slope_coef, tol = 1e-3)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.