| nnmaxheap_C | R Documentation |
Applies an isotonic regression-style projection to enforce that the
output vector is non-negative and non-increasing. Used internally
by predict.orthoMTL to ensure survival predictions
are monotonically decreasing across time thresholds.
nnmaxheap_C(m)
m |
A numeric vector to project. |
This function implements a pool-adjacent-violators style algorithm.
It replaces the external Iso package dependency used in the
predecessor orthopen package.
A numeric vector of the same length as m, projected
onto the non-negative non-increasing constraint space.
# Project a vector onto the non-negative non-increasing space
nnmaxheap_C(c(3, 1, 2, -1))
# Already valid input: returned unchanged
nnmaxheap_C(c(5, 3, 3, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.