R/singularValueImportance.R

Defines functions `singularValueImportance`

`singularValueImportance` <-
function(Y) {
        s = svd(Y)
        p = matrix(s$d)
        total = sum(p**2)
        p[1] = p[1]**2/total * 100
        for (i in 2:dim(p)[1]) {
                p[i] = p[i-1] + p[i]**2 / total * 100
        }
        return (p)
}

Try the mlegp package in your browser

Any scripts or data that you put into this service are public.

mlegp documentation built on March 18, 2022, 5:29 p.m.