[R] plot for linear discriminant

Giovanni Azua bravegag at gmail.com
Sat May 15 13:19:53 CEST 2010


Hello,

I have a labelled dataset with three classes. I have computed manually the LDA hyperplane that separate the classes from each other i.e.

\hat{\delta}_j(x)=x^Tb_j + c_j where b_j \in \mathbb{R}^p and c_j \in \mathbb{R}

my concrete b_j looks like e.g. 
b_j <- rbind(1,2)
c_j <- 3

How can I plot y=x^Tb_j + c_j ??  two problems:

1- I need lines and the dimension of my x is 2
2- I would like the plotted lines to end when they intersect so they nicely show the decision boundaries

Any pointers? maybe an example with ggplot2 I could not find any from the showcase documentation page ...

Thanks in advance,
Best regards,
Giovanni


More information about the R-help mailing list