Skip to content

Possible Errors code Tcov #3

@Fdoel

Description

@Fdoel

After implementing the C++ Tcov estimators, and Pn (Tarr scale estimator), resutls are underwhelming.

results_n=100-estimator=Pn.pdf

Above is the comparison using sum of squared differences for each variable.

results_n=101-estimator=Pn.pdf

Here is it using sum of absolute differences opposed to squared distances.

As these are disappointing, im afriad there might be some mistakes in my code.

Ideas of what might be wrong.

  1. Wrong true covariance matrix

I construct the 'true covariance matrix' by multiplying the true correlation matrix by the standard deviation matrices on both side. I calculate the standard deviation based on the base probabilities using the following formula.

maxresdefault

The code for this is under functions/probabilties.R

I checked the code by hand for a few examples, just to be sure, and that seemed right but maybe the implementation is wrong.

  1. Error in my C++ code.

I basically just tried to copy the code that was already there, but my understanding of C++ is limited so a mistake here is very plausible.

  1. Mistake in Error matrices

Currently I use the following code to compute the error matrices and the norm. (Example for TCov using manhattan distance.

  # get the TCov scatter matrix.
  tcov_man_matrix <- tcov_man_cpp(data, 2)
  # get the Frobenius norm of the error matrix
  tcov_man_norm <- norm(Sigma - tcov_man_matrix, type = "F")

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions