你如何计算一组循环数据的平均值? [英] How do you calculate the average of a set of circular data?

查看:248
本文介绍了你如何计算一组循环数据的平均值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想计算一组循环数据的平均值。例如,我可能会阅读指南针的几个样本。当然问题是如何处理环绕。相同的算法可能对钟表有用。



实际问题更复杂 - 统计数据在球体或代数空间中的含义是什么?例如添加剂组mod n。答案可能不是唯一的,例如359度和1度的平均值可能是0度或180度,但统计上0看起来更好。

这对我来说是一个真正的编程问题,我试图使它看起来不仅仅是一个数学问题。

解决方案

从角度计算单位矢量并取其平均值。 / p>

I want to calculate the average of a set of circular data. For example, I might have several samples from the reading of a compass. The problem of course is how to deal with the wraparound. The same algorithm might be useful for a clockface.

The actual question is more complicated - what do statistics mean on a sphere or in an algebraic space which "wraps around", e.g. the additive group mod n. The answer may not be unique, e.g. the average of 359 degrees and 1 degree could be 0 degrees or 180, but statistically 0 looks better.

This is a real programming problem for me and I'm trying to make it not look like just a Math problem.

解决方案

Compute unit vectors from the angles and take the angle of their average.

这篇关于你如何计算一组循环数据的平均值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆