带负数的加权平均值

发布于 2024-09-24 09:04:26 字数 554 浏览 1 评论 0原文

假设您需要显示棒球队表现的图形表示(我的软件问题与体育无关,但是......)。

假设您选择 25% 的计量表与第一次击球时击中的击球手的百分比有关。 接下来的 25% 与球队中在一场比赛中投出 n 次好球的投手百分比有关。 最后的 50% 与球队中在一场比赛中得分的击球手的百分比有关。

显而易见的计算是 (.25 * 百分比 1) + (.25 * 百分比 2) + (.5 * 百分比 3)。这将等于一些最终计算< 100.

假设您想在算法中添加一些“负”部分。例如,比赛中出现失误的外野手百分比。作为算法的一部分,它会如何工作?我认为你不能说这个百分比是-50%(负数),然后在某个地方再加上50%,加起来就是100%。这是行不通的,因为最终的计算结果可能是 > 100.

更新:(给出实际示例)

  • 百分比 1 为 25%
  • 百分比 2 为 25%
  • 百分比 3(这是负数)为 -50%
  • 百分比 4 为 ??? 100%

如果我们将百分比相加,那么我们就是 100%,但计算结果可能是 > 100.

Let's say you need to display a graphical representation of how well a baseball team is doing (my software problem is not related to sports but...).

Let say you chose that 25% of a gauge is related to the percentage of batters who hit during the first time at bat.
The next 25% related to the percentage of pitchers on the team who threw n number of strikes in a game.
The final 50% related to the percentage of batters on the team who scored during a game.

The obvious calculation is (.25 * percentage1) + (.25 * percentage2) + (.5 * percentage3). This will equal some final calculation < 100.

Let's say that you wanted to add some "negative" portion to the algorithm. Example, percentage of fielders who has an error during the game. How would that work as part of the algoritm? I don't think you can say that this percentage is -50% (negative) and then add an additional 50% somewhere to add up to 100%. That won't work because you'll potentially end up with a final calculation > 100.

UPDATED: (to give actual example)

  • Percentage 1 at 25%
  • Percentage 2 at 25%
  • Percentage 3 (this is negative) at -50%
  • Percentage 4 at ??? 100%

If we total the percentages then we are at 100%, but the calculations can come out to be > 100.

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

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

发布评论

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

评论(3

一个人的旅程 2024-10-01 09:04:26

只需将其添加进去即可。如果外野手是完美的,他们的错误率为 0,0*(-.5) = 0,您的计算仍然可能最大为 1。您不需要任何校正因子。

Just add it in. If the fielders are perfect, their error rate is 0, 0*(-.5) = 0, your calculation still has a possible maximum of 1. You don't need any correction factor.

月依秋水 2024-10-01 09:04:26

您可以衡量一个团队与任意限制相比的表现如何,或者可能是所有团队中最差的。

因此,如果您希望错误计数为 50%,任意限制为 100

.5 * (100 - NumberOfErrors)

或者您可以将一支球队与联盟中最差的球队进行比较,

.5 * 100 * (MostErrorsInTheLeague - NumberOfErrors) / MostErrorsInTheLeague

这样,最差的球队在该因素上的得分将为零,而一支球队的得分将为零。零错误将得到满五十。

You can measure how well a team did in comparison to an arbitrary limit, or possibly the worst of all the teams.

So, if you want errors to count for 50%, with an arbitrary limit of 100

.5 * (100 - NumberOfErrors)

Or you can measure a team against the worst in the league

.5 * 100 * (MostErrorsInTheLeague - NumberOfErrors) / MostErrorsInTheLeague

This way, the worst team will get a score of zero for that factor, and a team with zero errors will get the full fifty.

素食主义者 2024-10-01 09:04:26

均方误差
均方根偏差

这两个术语之一应该可以很好地比较两种算法,其中误差可能是既可以是消极的,也可以是积极的。

Mean Squared Error
Root Mean Square Deviation

One of these two terms should work well for comparing two algorithms where the error can be negative as well as positive.

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