Canoncorr Coefficients for large data

4 次查看(过去 30 天)
[A, B, r, U, V, stats] = canoncorr(XTrain,yTrain);
I am working with a large dataset, however our problem stems from the fact that we have over 50,000 observations and about 93 samples. We understand that the matrix will not be full rank when we run canoncorr, nonetheless we are curious as to how canoncorr picks specific observations for the coefficients (A and B) for each sample. To further explain, we created a LOOCV script to see which observations were picked for the coefficient matricies A and B. What we learned was that there were a handful of observations that were used on the training data for all of the samples, and only ~350 of the 50,000 observations were used for the training data.
Ultimate question: Does canoncorr randomly set the observations to 0 for the coefficients matrix when there are more observations than samples? Or is there a system for picking the best/most representative observations for the coefficients matrix?

回答(1 个)

Ayush Modi
Ayush Modi 2024-1-18
Hi Matt,
As per my understanding, you would like to know how does "canoncorr" function selects the observations to set to 0 if input matrix is not a full rank matrix. I am assuming that:
  • Observations are the individual data points or samples in the dataset i.e. 50,000 observations.
  • Variables are the different measurements or features recorded for each observation i.e. 93 variables.
"canoncorr" function does not randomly set observations to zero for the coefficients matrix. It systematically computes the canonical coefficients for the variables, and any zeros in the coefficients matrices correspond to variables that are linearly dependent on others.
Please refer to the following MathWorks documentation for more information on "canoncorr" function:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by