Commit c0cae758 authored by Tom Reynkens's avatar Tom Reynkens

Fix bug with lambda1 and lambda2 in computation of penalty weights

parent a197e8e8
Type: Package
Package: smurf
Title: Sparse Multi-Type Regularized Feature Modeling
Version: 0.4.0
Version: 0.4.0.9000
Date: 2018-09-24
Authors@R: c(
person("Tom", "Reynkens", email = "tomreynkens@hotmail.com", role = c("aut", "cre"),
......
......@@ -287,11 +287,11 @@
tmp <- unlist(pen.weights)
if (lambda1.orig > 0) {
tmp <- c(tmp, unlist(lambda1)[pen.cov %in% c("flasso", "gflasso", "ggflasso")] / lambda1.orig)
tmp <- c(tmp, unlist(lambda1[pen.cov %in% c("flasso", "gflasso", "ggflasso")]) / lambda1.orig)
}
if (lambda2.orig > 0) {
tmp <- c(tmp, unlist(lambda2)[pen.cov %in% c("flasso", "gflasso", "ggflasso")] / lambda2.orig)
tmp <- c(tmp, unlist(lambda2[pen.cov %in% c("flasso", "gflasso", "ggflasso")]) / lambda2.orig)
}
# Transform penalty weights
......@@ -358,11 +358,11 @@
tmp <- unlist(pen.weights)
if (lambda1.orig > 0) {
tmp <- c(tmp, unlist(lambda1)[pen.cov %in% c("flasso", "gflasso", "ggflasso")] / lambda1.orig)
tmp <- c(tmp, unlist(lambda1[pen.cov %in% c("flasso", "gflasso", "ggflasso")]) / lambda1.orig)
}
if (lambda2.orig > 0) {
tmp <- c(tmp, unlist(lambda2)[pen.cov %in% c("flasso", "gflasso", "ggflasso")] / lambda2.orig)
tmp <- c(tmp, unlist(lambda2[pen.cov %in% c("flasso", "gflasso", "ggflasso")]) / lambda2.orig)
}
# Transform penalty weights
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment