-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
median #20
Comments
#9:
|
I've had a look because I'm interested in using the median also. But in my case it's to average several sensors and not over time. I'll try to test this on my installation this weekend, and if it works as expected I'll come back to you. |
@jere19, |
Considering that this component does not work with datasets, but in fact with areas of geometric shapes, it would be more correct to calculate medians using algorithms for such cases. And this means the need to calculate factorials, which will dramatically increase the computational costs... I don't see a solution with reasonable computational costs yet. |
You end up with the wrong median. The |
Beta version of median calculation: https://github.com/Limych/ha-average/tree/feature/median Have a nice day! :) |
Great ! I'm happy to have been some help. I'll try this version ! |
I’m thinking, is it worth making the median value smoother? |
…1.55 Update pygithub requirement from ~=1.54 to ~=1.55
I would suggest to implement "median" from defined number of readings per time as an option. at this moment, this could be easily achieved by averaging large set of values, but this is not suitable for some applitations.
Example of state where average is not enough - battery powered water level sensor, which sends 10 measurement sequence every 2 hours. 10 measurements are because sensor readings are varying on water level movements. Sensor is ultrasonic, so some of readings are completely out of range because of bounces etc, e.g. my sewage reports it is 9m deep from time to time, so average varies a lot. Median from 10 measurements every 2 hours provides almost perfect result.
The text was updated successfully, but these errors were encountered: