cytomining/cytominer

Implement generalized log to transform feature values

Closed this issue · 1 comments

glog = function(x, c=1) log( (x+sqrt(x^2+c^2))/2 ))

Described in Pg. 8 of http://bioconductor.org/packages/release/data/experiment/vignettes/DmelSGI/inst/doc/DmelSGI.pdf

"For c = 0, the function is equivalent to an ordinary logarithm transformation. For c > 0, the function is smooth for all values of x (including 0 and negative values), avoiding the singularity of the ordinary logarithm at x = 0, but still approximately equivalent to the ordinary logarithm for x �>> c. For each feature, we chose c to be the 3%-quantile of the feature’s empirical distribution."

Implemented in a94ef98