逆概率选择(进化算法的逆适应度选择) [英] Inverse Probability Selection (Inverse Fitness Selection of Evolutionary Algorithms)

查看:126
本文介绍了逆概率选择(进化算法的逆适应度选择)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一组数据中随机选择一个样本。

I need to probabilistically select a sample from a set of data.

说我有一组值 array [12,15, 29,17,12,29] 。标准方法是计算总数(12 + 15 + 29 + 17 + 12 + 29),然后创建一个倾向于较高值的微调框。有点像饼图,我们从样本集中随机选择,但偏爱具有最高价值的个人。

Say I had a set of values array[12, 15, 29, 17, 12, 29]. The standard approach would be calculate the total (12 + 15 + 29 + 17 + 12 + 29) and then create a spinner that favors the higher value. Kinda like a pie chart where we select at random from the sample set but favor the Individual with the highest value.

一个数字大于您会随机选择的示例 array [0] 是11%,而 array [5] 的机会是25%。没关系

An example with the numbers above the chance you will randomly select array[0] is 11% while the chance that array[5] is 25%. That's fine

我想做的是偏爱较低的数字,而我凭借所有的集思广益的力量,我无法找到一种方法来给较低的数字统计上相等的概率选择,就好像我们要选择更大的数字一样。

What I want to do though is favor the lower numbers and with all my brainstorming power I cannot figure out a way to give the lower number a statistically equal probability of selection as if we were to select the larger number.

我解决问题的一种方法是添加 array [] 然后从总数中减去每个值,得到一个 array2 [102,99,85,102,85] ,然后重新计算 array2 [ ]。赋予 array [0] 21%。这种解决方案的问题在于,在数组[1] 中具有较高统计选择概率的元素具有较远的选择百分比。

One way I have approached the problem is to add array[] then subtract each value from the total giving you a array2[102, 99, 85, 102, 85] then recalculating the percents from array2[]. Giving array[0] a 21%. The problem with this solution is that elements with close statistical probability of selection in array[1] have distant selection percentages.

我们还尝试过将最低和最高,然后再与下一个最高的百分比转换为下一个最低,但这给您带来了与我们第一次尝试相同的问题。

We also attempted just swapping the lowest and highest then next lowest with next highest percent values but that gives you the same problem as our first attempt.

我觉得必须有一种简单的方法。

I feel like there has to be an easy way to to this.

注意:如果您熟悉通过进化/遗传计算,我们尝试基于适应度比例进行父代选择。但是,我们的适用性值却相反(越低越好)。那么,如果适应度越低越好,我们如何为父母进行适应度选择呢?

Note: If you are familiar with Evolutionary/Genetic Computation we are trying to do parent selection based on fitness proportion. However, our fitness value is reversed (the lower the better). So how do we do fitness proportion selection for parents if the lower the fitness the better?

推荐答案

为什么不与您合作倒数?您的示例中概率的基本数组为 array [1.0 / 12,1.0 / 15,1.0 / 29,1.0 / 17,1.0 / 12,1.0 / 29] ,其余的将保持不变。

Why don't you work with inverses? The base array for the probabilities in your example would be array[1.0/12, 1.0/15, 1.0/29, 1.0/17, 1.0/12, 1.0/29], the rest would stay the same.

这篇关于逆概率选择(进化算法的逆适应度选择)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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