shrink_mat: Shrunken covariance matrix

Description Usage Arguments Value

Description

Calculates a shrunken covariance matrix to be passed as the demoninator in the LDA formula. The shrunken matrix is in the subspace of the components that capture 95% of the variation of the dataset.

Usage

1
shrink_mat(R, samples_count, r)

Arguments

R

PCA scores

samples_count

number of samples to explain 95% of the variance

r

regularisation factor to smooth covariance matrix in order to reduce noise. 1 is no regularisatoin.

Value

covariance matrix


Swarchal/charDirection documentation built on May 9, 2019, 3:25 p.m.