This function estimates the covariance matrix of a real dataset.

learn_covariance(df, method = "lm")

Arguments

df

Dataframe containing the real dataset.

method

Method to used to estimate the eigenvalues of the matrix, default='lm'. See details.

Value

A matrix with the estimated covariance.

Details

Two methods are available for the estimation of the eigenvalues of the matrix. For lm, we fit a linear model on the log of the first eigenvalues on the log of their rank. For min, we add the minimum of the estimated eigenvalues to the complete set of eigenvalues to ensure that they are all positives.

Examples

if (FALSE) {
if(interactive()){
 attach(powerconsumption)

 # Using 'lm'
 cov <- learn_covariance(powerconsumption, 'lm')

 # Using 'min'
 cov <- learn_covariance(powerconsumption, 'min')
 }
}