您可以尝试向上移动数字空间,以便它们都变为正值。
要计算任意两个正数或负数之间的增益,您必须将一只脚放在幅度增长的世界中,另一只脚放在体积增长的世界中。您可以倾向于一侧或另一侧,具体取决于您希望结果收益如何出现,并且每个选择都会产生后果。
Strategy
-
创建一个移位方程,生成相对于旧数和新数的正数。
-
将自定义班次添加到旧数字和新数字中以获得 new_shifted 和 old_shifted。
-
进行 (new_shifted - old_shifted) / old_shifted) 计算以获得增益。
例如:
old -> new
-50 -> 30 //Calculate a shift like (2*(50 + 30)) = 160
shifted_old -> shifted_new
110 -> 190
= (new-old)/old
= (190-110)/110 = 72.73%
如何选择移位功能
如果您的移位函数将数字向上移动得太远,例如向每个数字添加 10000,您总是会得到微小的增长/下降。但如果变化足够大,足以使两个数字都进入正值,那么在边缘情况下,您将出现增长/下降的剧烈波动。您需要拨入换档功能,以便它对您的特定应用程序有意义。这个问题没有完全正确的解决办法,必须先苦后甜。
将其添加到 Excel 中以查看数字和收益如何变化:
shift function
old new abs_old abs_new 2*abs(old)+abs(new) shiftedold shiftednew gain
-50 30 50 30 160 110 190 72.73%
-50 40 50 40 180 130 220 69.23%
10 20 10 20 60 70 80 14.29%
10 30 10 30 80 90 110 22.22%
1 10 1 10 22 23 32 39.13%
1 20 1 20 42 43 62 44.19%
-10 10 10 10 40 30 50 66.67%
-10 20 10 20 60 50 80 60.00%
1 100 1 100 202 203 302 48.77%
1 1000 1 1000 2002 2003 3002 49.88%
增益百分比受数字大小的影响。上面的数字是一个不好的例子,是由原始移位函数产生的。
你必须问自己哪种生物的收获最多:
Evaluate the growth of critters A, B, C, and D:
A used to consume 0.01 units of energy and now consumes 10 units.
B used to consume 500 units and now consumes 700 units.
C used to consume -50 units (Producing units!) and now consumes 30 units.
D used to consume -0.01 units (Producing) and now consumes -30 units (producing).
在某些方面,可以说每种动物都以自己的方式成为最大的种植者。有些人说 B 是最好的种植者,其他人会说 D 是更大的收获。您必须自己决定哪个更好。
问题是,我们能否将这种对增长的直观感受映射成一个连续函数,告诉我们人类倾向于将什么视为“令人敬畏的增长”与“平庸的增长”。
成长是一件很神秘的事情
然后你必须考虑到小动物 B 可能比小动物 D 经历了更困难的时期。小动物 D 未来可能比其他小动物更有前景。它有一个优势!你如何衡量opportunity
, difficulty
, velocity
and acceleration
增长?为了能够预测未来,你需要对什么是“大本垒打”和“生产力的蹩脚进步”有一个直观的感受。
函数的一阶和二阶导数将为您提供“增长速度”和“增长加速度”。了解微积分方面的知识,它们非常重要。
哪个增长更多?是每分钟都在加速生长的生物,还是正在减慢生长的生物?高、低速度和高/低变化率怎么样?增长机会耗尽的概念又如何呢?成本效益分析以及利用机会的能力/能力。对抗性系统(你的成功来自于另一个人的失败)和零和游戏又如何呢?
有指数增长、线性增长。而且增长不可持续。成本效益分析并对数据拟合曲线。这个世界比我们想象的要奇怪得多。由于黑天鹅效应,绘制一条完美的数据线并不能告诉您接下来是哪个数据点。我建议所有人都听听这个关于增长的讲座,科罗拉多大学博尔德分校就增长、它是什么、它不是什么以及人类如何完全误解它进行了精彩的演讲。http://www.youtube.com/watch?v=u5iFESMAU58 http://www.youtube.com/watch?v=u5iFESMAU58
将一条线与热水的温度拟合,一旦你认为你已经拟合了一条曲线,黑天鹅就会发生,水就会沸腾。这种效应发生在我们整个宇宙中,而你的原始函数(新旧)/旧不会对你有帮助。
下面是 Java 代码,它在一个适合我的需要的简洁包中完成了上述大部分概念:
小动物的生长-(小动物可以是“无线电波”,“甲虫”,“油温”,“股票期权”,任何东西)。
public double evaluate_critter_growth_return_a_gain_percentage(
double old_value, double new_value) throws Exception{
double abs_old = Math.abs(old_value);
double abs_new = Math.abs(new_value);
//This is your shift function, fool around with it and see how
//It changes. Have a full battery of unit tests though before you fiddle.
double biggest_absolute_value = (Math.max(abs_old, abs_new)+1)*2;
if (new_value <= 0 || old_value <= 0){
new_value = new_value + (biggest_absolute_value+1);
old_value = old_value + (biggest_absolute_value+1);
}
if (old_value == 0 || new_value == 0){
old_value+=1;
new_value+=1;
}
if (old_value <= 0)
throw new Exception("This should never happen.");
if (new_value <= 0)
throw new Exception("This should never happen.");
return (new_value - old_value) / old_value;
}
Result
它的行为有点像人类对生物生长的本能感觉。当我们的银行账户从 -9000 到 -3000 时,我们说这比账户从 1000 到 2000 时有更好的增长。
1->2 (1.0) should be bigger than 1->1 (0.0)
1->2 (1.0) should be smaller than 1->4 (3.0)
0->1 (0.2) should be smaller than 1->3 (2.0)
-5-> -3 (0.25) should be smaller than -5->-1 (0.5)
-5->1 (0.75) should be smaller than -5->5 (1.25)
100->200 (1.0) should be the same as 10->20 (1.0)
-10->1 (0.84) should be smaller than -20->1 (0.91)
-10->10 (1.53) should be smaller than -20->20 (1.73)
-200->200 should not be in outer space (say more than 500%):(1.97)
handle edge case 1-> -4: (-0.41)
1-> -4: (-0.42) should be bigger than 1-> -9:(-0.45)