我应该使用哪种类型的分类系统?

发布于 2025-01-05 19:29:09 字数 1057 浏览 0 评论 0原文

我需要根据加速度计的运动模式数据训练分类器。对于每个时间样本,我存储了 XY 和 Z 坐标。因此,单个运动在我的数据集中表示如下:

[0.39028051 -0.5483283  10.385374]; [0.17420317 -0.2802931  10.72625]; [0.28956637  -0.13387422 11.9645]; [0.6281768    -0.14725612 13.369692]; [0.72674876 -0.115191355    14.50422]; [0.7450281   -0.079684645    15.090715]; [0.74526054 -0.44727635 15.027773]; [0.6936915  -0.9639046  14.088198]; [0.5290651  -1.1378883  12.5164585]; [0.23881127    -1.346372   10.889902]; [0.052466527    -1.2700776  9.227933]; [0.019615699 -0.8237766  7.65959]; [0.10373996   -0.29147366 6.416745]; [0.17365126  0.09419979  5.420801]; [0.18465124  0.3646446   4.5289593]; [0.22039331 0.52677184  3.8076568]; [0.33365434 0.48184758  3.4170833]; [0.40346703 0.21976978  3.472282]; 

其中 [] 之间的值表示 XYZ 分量。

起初我认为隐马尔可夫模型最适合我的问题。但我在定义数据中的状态时遇到了麻烦。我发现的所有例子都有一个明确定义的、有限的状态集(即下雨、晴天或多云)。我的数据集中的所有值都在 -11 和 +11 之间,但它们显然不是整数。不过,我可以用它作为状态吗?从而给我 11 * 11 * 11 = 1331 个状态?我将如何计算转移矩阵?

此外,运动之间的观察次数也不同(尽管属于同一类)。

很抱歉,这个问题太宽泛了,指向有关此类数据的 HMM 教程的指针也有很大帮助!

谢谢

I need to train a classifier on motion pattern data from an accelerometer. For each time sample I stored the X Y and Z coordinates. Thus a single movement is represented in my dataset like so:

[0.39028051 -0.5483283  10.385374]; [0.17420317 -0.2802931  10.72625]; [0.28956637  -0.13387422 11.9645]; [0.6281768    -0.14725612 13.369692]; [0.72674876 -0.115191355    14.50422]; [0.7450281   -0.079684645    15.090715]; [0.74526054 -0.44727635 15.027773]; [0.6936915  -0.9639046  14.088198]; [0.5290651  -1.1378883  12.5164585]; [0.23881127    -1.346372   10.889902]; [0.052466527    -1.2700776  9.227933]; [0.019615699 -0.8237766  7.65959]; [0.10373996   -0.29147366 6.416745]; [0.17365126  0.09419979  5.420801]; [0.18465124  0.3646446   4.5289593]; [0.22039331 0.52677184  3.8076568]; [0.33365434 0.48184758  3.4170833]; [0.40346703 0.21976978  3.472282]; 

where the values between [] represent the XYZ components.

At first i thought that a Hidden Markov Model would best fit my problem. But i'm having troubles defining the states in my data. All examples i find have a clear defined, finite set of states (i.e. rain, sunny or cloudy). All values in my dataset are in between -11 and +11, but they're not integers obviously. Still, could i use this as states? thus giving me 11 * 11 * 11 = 1331 states? And how would i calculate the transition matrix?

Furthermore the number of observation differ between movement (although belonging to the same class).

I'm sorry i this question is too broad, a pointer to a tutorial on HMM's with this type of data also helps a lot!

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2025-01-12 19:29:09

在伪代码中,计算两点之间的所有距离:

for index=0 to coords.length() step 2 
{
   x1=coord[i].x
   y1=coord[i].y
   z1=coord[i].z

   x2=coord[i+1].x
   y2=coord[i+1].y
   z2=coord[i+1].z

   deltaX = x2-x1
   deltaY = y2-y1
   deltaZ = z2-z1
   distance[i] = SquareRoot(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ)
}

然后您可以计算距离值的高斯分布,以及平均值、中位数、方差……算法不应该太复杂写起来很复杂,即使可能需要在这里或那里进行一些调整。

或者,另一种方法,在循环中您可以轻松计算当前距离和前一个距离之间的差异:

previousDistance = distance
distance = SquareRoot(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ)
diff = distance - previousDistance

然后应用 高通滤波器

in pseudocode, compute all the distances between two points:

for index=0 to coords.length() step 2 
{
   x1=coord[i].x
   y1=coord[i].y
   z1=coord[i].z

   x2=coord[i+1].x
   y2=coord[i+1].y
   z2=coord[i+1].z

   deltaX = x2-x1
   deltaY = y2-y1
   deltaZ = z2-z1
   distance[i] = SquareRoot(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ)
}

Then you can compute a Gaussian distribution on the distance values, and also the mean, the median, the variance... An algorithm shouldn't be too complicate to write, even if it may need some adjustment here and there.

Or, another method, within the loop you can easily compute the difference between the current and the previous distance:

previousDistance = distance
distance = SquareRoot(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ)
diff = distance - previousDistance

And then apply a high pass filter on diff.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文