From the course: Data Science Foundations: Data Mining in R
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
LDA
- [Instructor] Our next example of dimensionality reduction and practice is LDA or linear discriminant analysis. Now curiously, this isn't really a dimensionality reduction method, it's a classification method but it relies on dimensionality reduction under the hood. And I want to show you how that works so you can see one of the benefits of dimensionality reduction in general. To do this, we'll load a few packages and including CAR which stands for a companion to apply to regression. That gives us a scatterplot matrix function. Carrot, which gives us some training and testing functions and mass, which gives us the actual LDA function. So let's load all of these packages and then we're going to load the training and the testing datasets that we created earlier. TRN is train and TST is testing and then it's a good idea to set a random seed for any time that we might have randomization functions in there. So I'm going to set…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.