-
Notifications
You must be signed in to change notification settings - Fork 44
SMA Data Cleaner
ebiiii edited this page Oct 16, 2014
·
1 revision
##SMACleaner
This virtual sensor consumed only one data item at a time and maintains the simple moving average (SMA) of the values received. Based on the SMA, the current value and the acceptable error threshold, the virtual sensor returns 1 if the current value within the error threshold and 0 otherwise.
Parameters:
- size: A positive integer value representing the size of the window to be used for maintaining the SMA.
- error-threshold: A positive real value (between 0.01 to 1.00) which specified the maximum acceptable deviation from the SMA.
Sample code:
<processing-class>
<class-name>gsn.vsensor.SMACleaner</class-name>
<init-params>
<param name='size'>5</param>
<param name='error-threshold'>0.15</param>
</init-params>
<output-structure>
<field name='raw_value' type='double'/>
<field name='acceptable' type='double'/>
</output-structure>
</processing-class>