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

LDA docs clarification #197

Open
pdimens opened this issue May 31, 2022 · 5 comments
Open

LDA docs clarification #197

pdimens opened this issue May 31, 2022 · 5 comments
Labels

Comments

@pdimens
Copy link

pdimens commented May 31, 2022

The docs for LDA are quite technical but would benefit from some user-friendly explanations of the expected return values of a typical workflow including predict(lda_results, newdata) with the same level of detail as presented for the PCA section.

@wildart
Copy link
Collaborator

wildart commented Jun 1, 2022

Yes, some of the docs are scarce, and in need of more content, e.g. examples & explanations. If you have something in mind, please, let us know or send updates.

@pdimens
Copy link
Author

pdimens commented Jun 1, 2022

I'd love to, but I'm struggling a bit with the MC-LDA, which is why I bring this up =/

@wildart
Copy link
Collaborator

wildart commented Jun 1, 2022

You can try to replicate PCA example with Iris dataset to show LDA dimetionality reduction mode, see this scikit-learn example or this one.

If you want to show how LDA is used as classifier, then it will be more complicated because the package doesn't provide any classifier. You can start splitting data on training and testing parts. Fit the training data to MC-LDA model (you can also reduce dimensionality, so you can visualize results). Next, you calculate predictions using training data, and feed the original data and the predicted one into the classifier, e.g. nearest neighbors. Look at MLBase.j for some classification primitives and performance evaluation functionality.

@wildart wildart added the docs label Jun 1, 2022
@pdimens
Copy link
Author

pdimens commented Jun 1, 2022

Ah, I see. So MulticlassLDA does not provide the analagous functionality to the lda present in the R package MASS? I was trying to follow along this interesting post to see if it can be done with the present functionality. I suppose not. Unfortunately I don't have the intensive maths background to address this myself, but I will have a look at what MASS is doing out of curiosity.

@wildart
Copy link
Collaborator

wildart commented Jun 1, 2022

Basically, your article does what I proposed above. However, the post's part on dimensionality reduction is convoluted and unrelated to LDA. The scikit example more straightforward about the reduction.

I realized that MC-LDA still has problems that you reported in #187, and those things must be addressed first to make the interface more usable.

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

No branches or pull requests

2 participants