[R] Maximize volume of cloud
Stefaan Lhermitte
stefaan.lhermitte at biw.kuleuven.be
Thu May 12 19:54:59 CEST 2005
Dear R-ians,
I have a datamatrix X of nrows (large) and 3 colums. The 3 columns
represent the coordinates of a cloud in a 3 dimensional space.
Now I want to find the extremes of my cloud by using the N-FINDR
algoritm. This algorithm consists of maximizing the volume between tree
points. Therefore I need an optimaztion script, but I don't have any
idea how to program it.
According to literature the maximization of the volume can be replaced
by maximizinng the determinant of E,
where:
E<-matrix(c(1,e1,1,e2,1,e3), ncol=3)
and e1 to e3 are initially column vectors of the coordinates of random
points.
The procedure works by replacing an existing e1, e2 or e2 with another
trial point. If the replacement results in an increase of
determinant(E), the newly chosen pixel will replace the previous pixel.
The procedure has to be repeated till there are no possible replacements
left. In this way I get the coordinates of my extremes by e1 to e3.
Anyone any idea how to program this?
Kind regards and thanx in advance!
Stef
More information about the R-help
mailing list