[R] plot for linear discriminant
Hadley Wickham
hadley at rice.edu
Sun May 16 18:16:48 CEST 2010
Hi Giovanni,
Have a look at the classifly package for an alternative approach that
works for all classification algorithms. If you provided a small
reproducible example, I could step through it for you.
Hadley
On Sat, May 15, 2010 at 6:19 AM, Giovanni Azua <bravegag at gmail.com> wrote:
> 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
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
More information about the R-help
mailing list