-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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.
- 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.
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.
- 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.
- 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")
