A mean that calculates the n-th root of the product of the numbers.
Questions tagged [geometric-mean]
34 questions
1
vote
1 answer
Geometric mean filter for denoising image in MATLAB
I am new to MATLAB. I don't know how to use geometric mean filter for filtering noisy image. For arithmetic mean filter I use this:
H = fspecial('average',5);
a = imfilter(a, H);
Is there any similar way for geometric mean filter?

yld
- 35
- 2
- 9
1
vote
0 answers
How to skip NA when applying geometric-mean function
I have the following data frame:
1 8.03 0.37 0.55 1.03 1.58 2.03 15.08 2.69 1.63 3.84 1.26 1.9692516
2 4.76 0.70 NA 0.12 1.62 3.30 3.24 2.92 0.35 0.49 0.42 NA
3 6.18 3.47 …

Tim Tran
- 11
- 3
0
votes
0 answers
proper syntax for calculating geomtric mean of rasters in r?
Is there a way to perform geometric mean over rasters in r while accounting for NA's? Will the code below suffice? Was exploring methods for doing this iteratively using list.files, a forloop and a stack, but for now this will be…

user11057680
- 69
- 5
0
votes
1 answer
How to group dataframe and calculate geomean?
I have a df with a column with dates (data) and column with average daily change of price (DailyChange) and I need to group this df by year and for each year count the geometric mean from column DailyChange.
This is the part of the code :
df =…

Jiri
- 1
- 1
0
votes
0 answers
Standard error of geometric mean of values in Pandas after groupby
I have a pandas dataframe with time col (Week) and a value col (Impressions). I want to find the geometric mean and standard error of the Impressions col, grouped by per week. The caveat over here is, that many Impression values are zero. After…

pandi20
- 11
- 1
- 5
0
votes
2 answers
Binary Search using Geometric Means
Background:
When doing a binary search on an array, we initialise an upper h and lower l bound and test the mid-point (the arithmetic mean) half-way between them m := (h+l)/2. Then we either change the upper or lower bound and iterate to…

mattapow
- 105
- 5
0
votes
1 answer
Calculation of geometric fold error calculation in R
Hi I have created a dummy data set, I want to calculate geometric mean fold error between the obs/pred values of the model in R. Kindly help thanks
a=c(1,2,4,2,5,6,3,2,6,8,10,4)
b=c(1.3,3.2,4.4,2.5,1.6,4.5,5.5,2.2,3.1,6.4,3.0,6.3)
n=…

Raja
- 3
- 3
0
votes
1 answer
How to run scipy.stats.gmean for rows contanining values less than 1 and zeros?
We have the following dataframe (df)
print(df)
#Gene GSM772 GSM773 GSM774 GSM775 GSM776
0610007P14Rik 0.003485 0.003415 0.005431 0.003667 0.007146
0610009B22Rik 0.001220 0.001351 0.001762 0.001404 …

TraPS-VarI
- 21
- 6
0
votes
1 answer
Oracle SQL lag function with partition
I have a table which contains year, month, period, region_code, item_code, current_price columns in a mixed order as shown…

ince
- 5
- 2
0
votes
1 answer
How to calculate the sum of geometric series
I want to calculate the sum of a geometric series. ie: 1 , 5 , 25 , 125 , etc
I try to use the math formula to calculate it: a(r^n -1)/(r-1)
My code:
int a = 1;
int r = 5;
int deno = r -1;
int n = 3
int rn = r^n -1 ;
int total = a * rn /…

smallnoob
- 23
- 6
0
votes
1 answer
Calculating The Geometric mean of a searies in C
I need to write a program that will calculate the arithmetic and geometric average of 10 variables.
When I run tests on the program, it fails to calculate the geometric mean when there are numbers that include zero, for instance the series: 3 2 1 0…
0
votes
0 answers
How to plot geometric mean with confidence intervals in ggplot2 R?
I have a dataset for which I want to calculate the geometric mean and the bootstrapped confidence interval. The data has "status" and and "index" ranging from 0 to 1.
I want to know:
(a) Is there an option where the fun.y = mean can be replaced by a…

Rspacer
- 2,369
- 1
- 14
- 40
0
votes
1 answer
Simplifying recursive formula in geometric (or arithmetic) series
I am trying to implement a recursive function, but that is too computationally intensive. I think there are certain ways to simplify recursive functions into geometric (or arithmetic) series.
If it can be simplified, than I can just code the…

Kiann
- 531
- 1
- 6
- 20
0
votes
0 answers
R code produces different output for equation in loop every time
I'm trying to calculate the geometric mean and find the maximum possible value for it for a certain set of parameters. I am convoluting two distributions (I think, not sure about the terms in english), one of which is the probability density…

Lotte Victor
- 89
- 1
- 12
0
votes
0 answers
Optimizing calculation for Weighted Geometric Mean of a big set of data using GPU
I need help with an optimization and performance problem related to the calculation of the Weighted Geometric Mean of some data.
I introduce the problem with a little sample.
I wrote the code to calculate the WGM for the simple example below.
% A…

Relok
- 301
- 4
- 14