This function estimates the covariance matrix of a real dataset.
learn_covariance(df, method = "lm")
Dataframe containing the real dataset.
Method to used to estimate the eigenvalues of the matrix, default='lm'. See details.
A matrix with the estimated covariance.
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.
if (FALSE) {
if(interactive()){
attach(powerconsumption)
# Using 'lm'
cov <- learn_covariance(powerconsumption, 'lm')
# Using 'min'
cov <- learn_covariance(powerconsumption, 'min')
}
}