-
Notifications
You must be signed in to change notification settings - Fork 19
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
Would it be also possible to use a LLM for doing Factor Analysis (FA) instead of Regression ? #2
Comments
Hi, thanks for reaching out! Interesting question! I haven't thought about it until your message. One issue I can foresee would be that of context, as you would need to give a (input, output) pairs where the input is a matrix instead of a vector. I briefly tried today to see if LLMs could predict the largest eigenvalue for a given matrix. I created random matrices (5x5) with given (random) eigenvalues, then gave example in-context to Claude 3 Opus. I only gave 20 examples as input and asked to predict the output for the 21st example. It did not look terrible but not extremely good either. I only tried it with 5 seeds. Below are some results:
(Note: This was just a preliminary test) Regarding whether it can perform better than traditional FA algorithms, I think it is hard to say. LLMs seem very good at finding the underlying pattern, so maybe there is a way to use it, directly or indirectly. Do you have a specific use-case in mind where you would like to apply FA? |
I have no particular use-case in mind, but I will search for one, that hopefully makes it possible to make comparisons with traditional FA algorithms. The criterion for deciding which FA algorithm is the best would be: highest percentage explained variance. Perhaps we can construct a synthetic data set for which we know the ground truth Factor Analysis result? An often used existing dataset for doing FA on is the Boston Housing set: A question about your examples, for example the first one: Eigenvalues of the input matrices: [4.31, 4.41, 0.99, 7.87, 9.45, 8.37, 7.86, 9.56, 9.37, 0.04, 5.42, 4.49, 4.8, 9.45, 7.41, 6.98, 1.01, 5.74, 7.58, 5.22] When I look at that list of Eigenvalues, the largest one has value: 9.56 |
After seeing your use of LLMs for doing regression, I can not stop wondering about this question:
Would it be also possible to use a LLM for doing Factor Analysis (FA) instead of Regression ?
Of course Factor Analysis is a dimensionality reduction algorithm and not a regression algorithm, but I do not see a particular reason why FA could not be used instead of regression in your particular setup in conjunction with a LLM !
So my question is: is this possible? And could the performance even be better than traditional FA algorithms?
The text was updated successfully, but these errors were encountered: