Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review recoverers for EVD-based methods #60

Open
3 tasks
jbgracey6 opened this issue Oct 8, 2024 · 1 comment
Open
3 tasks

Review recoverers for EVD-based methods #60

jbgracey6 opened this issue Oct 8, 2024 · 1 comment

Comments

@jbgracey6
Copy link
Collaborator

Hi @corybrunson. I believe the following methods could stand to be revised so that the recoverer functions better reflect the inner eigenvalue decomposition:

  • methods-base-eigen.r
  • methods-stats-factanal.r
  • methods-stats-cmds.r

Currently, these functions take as rows the elements that are really supplemental rows, in this case the transposed columns. To remedy this, I think we should define recover_supp_rows.{function}() for each method and have recover_rows.{function}() return a 0xn matrix, as we did for psych::principal() and stats::princomp().

@corybrunson
Copy link
Owner

@jbgracey6 thanks a lot. I agree, after a glimpse at some source code, that these are the methods to revise.

We will need to check, for each case, (1) how the input data are processed before the eigen-decomposition and (2) how the eigen-decomposition is annotated as output. I think it would be valuable to talk through each case here for future reference.

For example, when the input data d to cmdscale() is a matrix with both row and column names, it is modified only element-wise (e.g. d^2), and then the output $points (which are inertia-laden eigenvectors) adopt the row names rather than the column names. To me, this means that recover_rows() should recover $points while recover_cols() should recover an empty matrix. My guess is that factanal() will behave like princomp(), as you say, but i have not looked closely.

eigen() may be an exception. This is a raw decomposition function; the input matrix x is not modified at all before being passed to one of the La_*() functions, and there is no output annotation derived from some data analytic interpretation. So it might make sense to return the matrix of eigenvectors both as active rows and as active columns. Or, it may just be time to retire the wrapper function eigen_ord(), since eigen() now produces an object of class 'eigen' as output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants