Nothing
## z = Xb unrestricted
mregnn <- function (x, y, a) {
k <- qr.Q(qr(x))
u <- drop (crossprod(k, y))
v <- -crossprod (k, t(a))
lb <- nnls(v, u)$x
xb <- drop(k %*% (u - v %*% lb))
return (list(xb = xb, lb = lb, f = sum((y - xb) ^ 2)))
}
## z monotone restricted
mregnnM <- function (x, y) {
k <- qr.Q(qr(x))
u <- drop (crossprod(k, y))
v <- -t(diff(k))
lb <- nnls(v, u)$x
xb <- drop(k %*% (u - v%*% lb))
return (list(xb = xb, lb = lb, f = sum((y - xb) ^ 2)))
}
## z positive
mregnnP <- function (x, y) {
k <- qr.Q(qr(x))
u <- drop (crossprod(k, y))
v <- -t(k)
lb <- nnls(v, u)$x
xb <- drop(k %*% (u - v%*% lb))
return (list(xb = xb,lb = lb, f = sum((y - xb) ^ 2)))
}
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.