Differences
This shows you the differences between two versions of the page.
|
projs:clans:docs:prediction_lib_utilanalz_smooth [2014/01/21 09:59] cheungzeecn |
projs:clans:docs:prediction_lib_utilanalz_smooth [2014/01/21 09:59] (current) cheungzeecn |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| A simple filter filter a list consists of list(like [0, 1] for x=0, y=1), takes the noises off. | A simple filter filter a list consists of list(like [0, 1] for x=0, y=1), takes the noises off. | ||
| ===== Paramters ===== | ===== Paramters ===== | ||
| - | - x_y list of lists, | + | - x_y list of lists, x_y is a list like [[0, 0],[1, 1],] |
| - | x_y is a list like [[0, 0],[1, 1],] | + | |
| - threshold int, for threshold value, if the abs(value, other_value) more than threshold, the value may be a noise | - threshold int, for threshold value, if the abs(value, other_value) more than threshold, the value may be a noise | ||
| - poolN int, how long the polling poll is. For poolN=10, the function would look forward 10 items, back 10 items, than the items poll according to the parameter threshold. If the agreement more than a half, this point is not a noise. | - poolN int, how long the polling poll is. For poolN=10, the function would look forward 10 items, back 10 items, than the items poll according to the parameter threshold. If the agreement more than a half, this point is not a noise. | ||
| + | |||
| ===== Return ===== | ===== Return ===== | ||
| - a list that will return a smoothed list of data. | - a list that will return a smoothed list of data. | ||
| Line 27: | Line 27: | ||
| smooth(a, int threshold=5, int poolN=3) | smooth(a, int threshold=5, int poolN=3) | ||
| - | will returns | + | will return |
| [ | [ | ||
| [6, 6], | [6, 6], | ||