Skip to main content
Hello everyone,

 

I have a workspace that takes 2 point feature classes from a geodatabase and calculates the Root Mean Square Error (RMSE) of the x and y coordinates (i.e. sqrt( x(observed) - x(predicted))**2/n)). As part of this calculation I would have to do a truncated mean calculation where I would drop the top and bottom 10 % of records of residual X,Y values and then calculate the RMSE on the remaining 80% of the records. I understand the statistics calculation for truncated mean but I am not sure how to do this in FME workspace.

 

Any help/suggestion is greatly appreciated.

 

Thank you! 
Hi,

 

 

How about this procedure? Assuming that you have created features which contain "x(observed)" and "x(predicted)" as attributes.

 

(1) For each feature, calculate "(x(observed) - x(predicted))**2" and assign the result value to a new attribute. e.g. "value"

 

(2) Use a StatisticsCalculator to count the number of features, and set it to every feature. e.g. "num"

 

(3) Add the lower and upper thresholds of the "num" to the features coming from the Complete port of the StatisticsCalculator.

 

lower = num * 0.1

 

upper = num * 0.9

 

(4) Sort the features by the "value".

 

(5) Add 0-based sequential number to the features with a Counter. e.g. "count".

 

(6) Filter out  the features whose "count" is less than "lower" or greater than "upper".

 

(7) Calculate the RMSE using the remained features.

 

 

Takashi
Thanks a lot Takashi! The process works!!!

Hello @proxima ,@takashi

I'm trying to accomplish the exact same thing , Im not calculating RMS.

On step2,you talk about setting it to every feature."e.g num"

(the _count attribute has a count i.e total number of records in the excel)

I have excel file of count ,position and torque of a valve . I want to calculate truncated mean

I'm looking for direction on how you have accomplished this.

Thanks in advance

 


Hi,

 

 

How about this procedure? Assuming that you have created features which contain "x(observed)" and "x(predicted)" as attributes.

 

(1) For each feature, calculate "(x(observed) - x(predicted))**2" and assign the result value to a new attribute. e.g. "value"

 

(2) Use a StatisticsCalculator to count the number of features, and set it to every feature. e.g. "num"

 

(3) Add the lower and upper thresholds of the "num" to the features coming from the Complete port of the StatisticsCalculator.

 

lower = num * 0.1

 

upper = num * 0.9

 

(4) Sort the features by the "value".

 

(5) Add 0-based sequential number to the features with a Counter. e.g. "count".

 

(6) Filter out  the features whose "count" is less than "lower" or greater than "upper".

 

(7) Calculate the RMSE using the remained features.

 

 

Takashi

Hello @proxima ,@takashi

I'm trying to accomplish the exact same thing , Im not calculating RMS.

On step2,you talk about setting it to every feature."e.g num"

(the _count attribute has a count i.e total number of records in the excel)

I have excel file of count ,position and torque of a valve . I want to calculate truncated mean

I'm looking for direction on how you have accomplished this.

Thanks in advance

 


Hello @proxima ,@takashi

I'm trying to accomplish the exact same thing , Im not calculating RMS.

On step2,you talk about setting it to every feature."e.g num"

(the _count attribute has a count i.e total number of records in the excel)

I have excel file of count ,position and torque of a valve . I want to calculate truncated mean

I'm looking for direction on how you have accomplished this.

Thanks in advance

 

Hi @adi, check out the features output from the Complete port. All the input features will be output via this port and they have every computed statistics value - "num" in this case.


Thank you @takashi, I appreciate your response,I was able to figure it out and calculate truncated mean