其中算法将被要求做到这一点?

编程入门 行业动态 更新时间:2024-10-23 05:37:44
本文介绍了其中算法将被要求做到这一点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有这种形式的数据:

  • 对于x = 1,y是一个{1,4,6,7,9,18,16,19}
  • 对于x = 2,y是{1,5,7,4}
  • 一个
  • 对于x = 3,y是一个{2,6,4,8,2}
  • ...
  • 对于x = 100,y是一个{2,7,89,4,5}

只有在每一组中的一个值是正确的值,其余的是随机噪声。

Only one of the values in each set is the correct value, the rest is random noise.

我知道,正确的价值观描述了一个正弦函数,它的参数是未知的。我如何才能找到值的正确组合,从每个组? 我期待像货郎担组合优化算法

I know that the correct values describe a sinusoid function whose parameters are unknown. How can I find the correct combination of values, one from each set? i am looking something like "travelling salesman"combinatorial optimization algorithm

推荐答案

这取决于你所说的完全的意思,和你事先知道。如果您知道频率w和的正弦曲线是无偏的,你有一个公式

It depends on what you mean by "exactly", and what you know beforehand. If you know the frequency w, and that the sinusoid is unbiased, you have an equation

一个COS(W * X)+ B罪(W * X)

a cos(w * x) + b sin(w * x)

有两个(X,Y)点在不同的x值,你可以找到A和B,然后检查生成的曲线对所有其他点。选择具有最小的数y观察的两个X值,并尝试它全部的Y的。如果有偏差,即你的方程是

with two (x,y) points at different x values you can find a and b, and then check the generated curve against all the other points. Choose the two x values with the smallest number of y observations and try it for all the y's. If there is a bias, i.e. your equation is

a cos(w * x) + b sin(w * x) + c

您需要看三个x值。

如果您不知道的频率,你可以尝试同样的技术,不幸的是,解决方案可能不是唯一的,有可能不止1瓦特适合。

If you do not know the frequency, you can try the same technique, unfortunately the solutions may not be unique, there may be more than one w that fits.

修改作为我理解你的问题,你对每个x一个真正的y值和一帮不正确的。你想找到真正的价值。要做到这一点,最好的办法就是通过少量的点,以适应曲线和检查,看看是否曲线拟合中的其他设置一些y值。

Edit As I understand your problem, you have a real y value for each x and a bunch of incorrect ones. You want to find the real values. The best way to do this is to fit curves through a small number of points and check to see if the curve fits some y value in the other sets.

如果不是所有的x值具有有效的y值那么相同的技术应用,但是你需要看一组对大得多,三倍或四倍(基本上每对,三重或不同的y值点,四)

If not all the x values have valid y values then the same technique applies, but you need to look at a much larger set of pairs, triples or quadruples (essentially every pair, triple, or quad of points with different y values)

如果你的问题是别的东西,我怀疑它,请指定它。

If your problem is something else, and I suspect it is, please specify it.

  • 定义正弦曲线。大多数人认为这意味着表单 A COS(W * X)+ B罪(W * X)+ C 的功能。如果你的意思是不同的,指定它。
  • Define sinusoid. Most people take that to mean a function of the form a cos(w * x) + b sin(w * x) + c. If you mean something different, specify it.
  • 2指定正是成功的样子。举个例子说,10分,而不是100将是很好的。

    2 Specify exactly what success looks like. An example with say 10 points instead of 100 would be nice.

    这是非常清楚这是什么,是因为有组合优化。

    It is extremely unclear what this has to do with combinatorial optimization.

    更多推荐

    其中算法将被要求做到这一点?

    本文发布于:2023-07-05 06:55:10,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1034381.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:这一点   将被   算法

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!