[BioC] KLdist.matrix
Wolfgang Huber
whuber at embl.de
Sat Jul 2 18:44:39 CEST 2011
Dear Ladan
you can see the source code of this function by typing
showMethods("KLdist.matrix", inc=T)
and there you will see the code fragment
for (i in 1:nr) {
if (nc > 10000)
dat <- sample(x[i, ], nc * 0.1)
....
}
i.e. the data are randomly subsampled if nc, the number of columns of
the matrix, is above 10000.
It would have been reasonable to expect that this behaviour would be
documented in the function's manual page.
Numeric integration is a difficult task, and I would consider this
function a first, brave move into the right direction. Feedback on its
performance on various applications will for sure be welcome, and if you
take it as a start point for adaptation / further development to fulfill
the needs of your use case, that might be the wisest way of making use
of it.
Best wishes
Wolfgang
Il Jul/1/11 12:27 PM, Ladan Amini ha scritto:
> Hello,
>
> I am using KLdist.matrix from bioDist package, and the KL distance between
> two time series is
> slightly different for different runs.
>
> Example:
> n.th=rnorm(10^6,mean=0,sd=sqrt(0.1))
> n.exp=rnorm(10^6,mean=0,sd=sqrt(0.5))
> x<- rbind(n.th,n.exp)
> #run no.1
> KLdist.matrix(x, symmetrize = TRUE)
> #result:
> # n.th
> #n.exp 1.228867
> #run no.2
> KLdist.matrix(x, symmetrize = TRUE)
> #result:
> # n.th
> #n.exp 1.142033
> #run no.3
> KLdist.matrix(x, symmetrize = TRUE)
> #result:
> # n.th
> #n.exp 1.162144
>
> I tried to fix the value of gridsizenumber, but it gives the following
> error:
>
> KLdist.matrix(x, symmetrize = TRUE,gridsizenumber=10)
> Erreur dans .local(x, ...) : argument(s) inutilisé(s) (gridsizenumber = 10)
> ERROR
>
> I would appreciate a lot if anyone can help me to solve this problem.
>
> Thank!
> Ladan
>
> [[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Wolfgang Huber
EMBL
http://www.embl.de/research/units/genome_biology/huber
More information about the Bioconductor
mailing list