[R] Weighted pairwise LDA

2014-03-03 Thread ben1983
Hello All,
I am doing LDA, trying to build a model to identify type of
bacteria. Unfortunately the training group sizes are very smalln=4 for
each groupof which there are 10.

I have noticed that LDA is highly influenced by outlying groups and 'pulls'
the LDs towards them (as you would expect). 

I have looked around and found pair-wise weighted LDA. This is a rather
clever way of 'normalising' the weight given to LD scores according to the
euclidian distance between groups, thus giving better separation power to
other groups to the minor loss of power for the outlying group. 

I am able to write a programme to do this for me, but my standard results
(unweighted) are not as good as those from the R programme LDA. I know R
does LDA in a slightly more sophisticated way than me.as I just using
bog standard (Sw-1)Sb eigenvectors due to my general ignorance. 

I was wondering if anyone knew of an LDA package in R which features some
sort of 'pair-wise' distance weighting. 

Thanks in advance,
Ben 




--
View this message in context: 
http://r.789695.n4.nabble.com/Weighted-pairwise-LDA-tp4686145.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Actual code for LDA

2014-02-12 Thread ben1983
Hi All,
I've been trying to write my own code for LDA (linear discrim) so I
can modify it to be weighted LDA since some of my groups are outliers. 

However, the code I write for standard LDA gives me slightly different
results to those from R (slightly different LDAs.and not just scalar
differences. 

Does R simply invert the pooled within groups scatter matrix e.g. solve(Sw)
and multiply it by the between groups scatter Sb, then take the eigen
vectors?

This is the approach that I use, yet get slightly different
results..does R by default use a slightly more robust inverse or
estimate of Sw?? 

I've looked at the source code, and I find it very hard to follow. 

If anyone has any ideas that would be great!!
Thanks,
Ben



--
View this message in context: 
http://r.789695.n4.nabble.com/Actual-code-for-LDA-tp4685194.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Optimum of lm

2013-07-01 Thread ben1983
Hi All, 
  I am trying to do some D o E. I would like to find the optima
(maxima) of a 2 dimensional lm with quadratic terms.
I'm sure there is a really simple solution but i can't find it.
Also would there be any way to find some sort of confidence limits on these
optima?
Any help most appreciated!
Cheers,
Ben



--
View this message in context: 
http://r.789695.n4.nabble.com/Optimum-of-lm-tp4670674.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Returning overall ms for CVlm

2013-04-19 Thread ben1983
Hi All, when doing CVlm cross validation, I would just like to view the
overall MS but i am having trouble getting just this value.  I'm kina new to
R.
Any help really appreciates.
Cheers,
Ben



--
View this message in context: 
http://r.789695.n4.nabble.com/Returning-overall-ms-for-CVlm-tp4664690.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Sequence analysis

2013-04-19 Thread ben1983
Hiya,
I am trying to look at the similarities between a number of
sequences, for example i am trying to see how similar ababbbassdaa is to
addffggssbbsbbs I was wondering is the some way for me to see how similar
they are in terms of, for example, number of a's, number of b's, how often a
and ab are consecutive, how often abab is together etc.
Any advice would be really useful..any kind of shove in the right
direction would be amazing! I've tried doing basic alignments but i think
this is loosing quite a lot of information.
Many thanks,
Ben



--
View this message in context: 
http://r.789695.n4.nabble.com/Sequence-analysis-tp4664693.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.