Skip to contents

Modified geometric mean function to avoid zero values. In brief, the function adds a delta value to the dataset to avoid zeros. It optimize the delta value to be added to the dataset until the difference between (i) the geometric mean of the non zero values in the dataset and the geometric mean of the same values plus delta is less than epsilon. see https://arxiv.org/abs/1806.06403 Thanks to Roberto de la Cruz for the implementation (06/05/2020)

Usage

geom_mean_modified(dataset, epsilon)

Arguments

dataset

vector of values

epsilon

epsilon value to optimize the delta value added to the dataset