I am doing the lab section: classifying the stock data using LDA in the book "Introduction to Statistical Learning with Applications in R", here is the lab video. Basically, this lab uses LDA to predict the stock
Lag2 as following,
lda.fit = lda(Direction~Lag1+Lag2, data=Smarket, subset=Year<2005)
The coefficients are
Coefficients of linear discriminants: LD1 Lag1 -0.6420190 Lag2 -0.5135293
And following the lab steps, plot the LDA fit,
the plot is like below
I am having difficulties interpreting the plots. In the book it says that
The plot() function produces plots of the linear discriminants, obtained by computing −0.642 × Lag1 − 0.514 × Lag2 for each of the training observations.
I don't understand what this sentence exactly is meaning here,
- What's the
yaxis of this plot? And what does the axis mean here?
- Why the plot is a bar plot?
- How the
computing −0.642 × Lag1 − 0.514 × Lag2is related to the