没有合适的资源?快使用搜索试试~ 我知道了~
Objective Function Analysis:用于机器学习的神经网络的替代方案。-开源
需积分: 9 0 下载量 112 浏览量
2021-05-31
19:51:48
上传
评论
收藏 693KB DOCX 举报
温馨提示
试读
29页
目标函数分析将知识建模为实体的感知和响应(它们本身就是感知)和目标函数 (OF) 的多维概率密度函数 (MD-PDF)。 学习算法是在给定感知的情况下选择响应的动作,从而最大化目标函数。 MD-PDF 最初由统一随机数生成器播种。 响应用于评估OF,并且OF在由感知和响应形成的概率子空间中被加强或减少。 换句话说,作为对其感知的响应,实体评估由 n 个感知和 m 个响应定义的子空间中 OF 的每个可能值,并选择使 OF 最大化的响应。 最终,随机播种的 MD-PDF 会发生变化以反映 OF 中体现的数学特性。 OFA 通过在这个存储库中维护的几个模拟来演示。 联系 [email protected]。
资源详情
资源评论
资源推荐
Objective Function Analysis
An Alternative to Neural Net Machine Learning
Phil Gillaspy, Ph.D.
July, 2019
Objective Function Analysis models intelligence as a multi-dimensional probability mass
function (MD-PMF) of the perceptions and responses (which are themselves perceived)
of an entity and it’s inherent objective function (OF). We say that the entity has
intelligence because it maintains the joint probability
P[OF, r
j
, p
i
] (1)
where
OF is the objective function,
p
i
is 1...n perceptions of the entity,
r
j
is 1...m responses of the entity (note that responses are perceived just as if they
were perceptions).
The OF expresses the probability of a successful response to the given set of
perceptions. The learning algorithm is the action of
1) For the jth response, project and evaluate the effectiveness of the response by
calculating the objective function (OF) for the jth response subject to the given set of
perceptions.
2) Update the conditional probability of the OF corresponding to the jth response,
P[OF | r
j
, p
i
] (2)
3) Repeat steps 1 and 2 for all possible responses, then proceed to step 4.
4) Find the maximum conditional expected OF,
max { <OF>
j
= ∑
k
OF
k
* P[OF | r
j
, p
i
] }, (3)
then the actual response of the entity is the response corresponding to max{<OF>
j
}.
5) Having responded as in step 4, the entity is placed into a new set of values for the
perceptions. The entity continues responding per steps 1 through 4 above.
As the learning algorithm progresses, the OF is either reinforced or diminished in the
conditional probability subspace formed by the perceptions and responses, i.e. P[OF | r
j
,
p
i
]. Stated another way, in response to its perceptions, an entity evaluates every possible
value of the OF in the subspace defined by the n perceptions and m responses and
chooses the response which maximizes the OF. Eventually the randomly seeded MD-
PMF changes to reflect the logical and mathematical properties embodied in the OF.
What is the nature of the OF? The OF is a user designed function based upon empirical
knowledge, intuition, known mathematical relations, etc. and will vary depending upon
the application. How about an example. Let’s say the entity is presented with an obstacle
for which it must find a way around. Let’s say we have a two dimensional system in
which the entity perceives the lateral separation (x axis) and the forward separation (y
axis) between itself and the obstacle. The entity must move in the y direction to move
around the obstacle. Then we might qualitatively implement an OF as follows:
If the lateral separation is sucient to clear the obstacle given forward movement, then
the entity should move zero laterally, otherwise it should move laterally just enough to
clear the obstacle.
If the forward separation is greater than the maximum allowed forward movement per
time step, then ideal forward movement is maximum forward movement, otherwise if
lateral separation allows, then the ideal move is the maximum forward movement, else
the ideal forward movement is the forward separation.
And now quantitatively expressed as
Let OF
vx
= OF for lateral movement dependent upon lateral separation between entity
and obstruction,
OF
vy
= OF for forward movement dependent upon forward separation and lateral
separation,
vx = lateral movement response derived from maximum <OF> as in equation 3,
vy = forward movement response derived from maximum <OF> as in equation 3,
lateralDx = the lateral separation between entity and obstruction,
forwardDy = the forward separation between entity and obstruction,
kYRange = the maximum forward movement allowed per time step,
kDiameter = the diameter of the obstruction and also entity,
xSigma = scaling value for lateral movement,
ySigma = scaling value for forward movement.
Set OF
vx
= 0 if separation >= entity diameter (no lateral movement is necessary), else
we want maximum probability when lateral movement is greater than or equal to lateral
separation (thus making the separation >= kDiameter).
if ( |lateralDx| > kDiameter) (4)
{
OF
vx
= exp(-xSigma * (vx*vx); // max <OF> when vx = 0
}
else
{
if (lateralDx == 0 && vx == 0) // entity must move laterally, so no movement is bad
{
OF
vx
= 0;
}
else
if (lateralDx >= 0 && vx > 0) // max <OF> when move is just enough to clear obstacle
{
int x = (kDiameter+2) – (lateralDx + vx);
OFvx = exp( -xSigma * (x*x));
}
else
if (lateralDx >= 0 && vx <= 0) // entity should not move across vertical axis of obstacle
{
OFvx = 0;
}
else
if (lateralDx <= 0 && vx < 0) // max <OF> when move is just enough to clear obstacle
{
int x = (kDiameter+2) + (lateralDx+vx);
OFvx = exp(-xSigma * (x*x));
}
else
if (lateralDx <= 0 && vx >= 0) // entity should not move across vertical axis of obstacle
{
OFvx = 0;
}
}
The above objective function specific to lateral movement states that if the entity is on a
collision course with the obstruction, then the optimum (highest probability) lateral
movement is that movement which is just enough to clear the obstruction. Note that the
exponential function is a gaussian distribution function.
Let y = kYRange, then for OF
vy
we have,
If (forwardDy > kYRange) (5)
{
y = y – vy; // maximum movement maximizes OF
OF
vy
= exp( -ySigma * (y*y));
}
else
{
if (lateralDx > kDiameter)
{
y = y – vy; // sufficient lateral separation allows maximum forward move
OF
vy
= exp( -ySigma * (y*y));
}
else
{
y = forwardDy – vy; // insufficient lateral separation limits forward move
OF
vy
= exp(-ySigma * (y*y));
}
}
Again the above objective function specific to the forward movment states that if either
there is sufficient lateral separation to clear the obstacle or the entity is sufficiently far
away, then the maximum forward movement is allowed, otherwise the entity can only
move as far forward as the obstacle.
The overall OF is as follows
OF = OF
vy
* OF
vx
(6)
The above described objective function will be used in a simulation that will be
discussed later. For now though, let us consider further the joint and conditional
probabilities expressed in equations 1 and 2 above. As was stated earlier, the joint
probability was seeded with random numbers. As you might surmise, the conditional
probability of equation 2 is of paramount interest since the learning algorithm proscribes
the entity as acting in response to its perceptions. The random seeding is done such that
the set of conditional probabilities expressed by equation 2 are each normalized. The
seeding is done by randomly picking an interval in the OF histogram (recall we are
speaking in terms of a probability mass function). The count in that interval is increased
by one, thus the OF histogram is filled with one hundred counts randomly spread
throughout the OF. For example consider the example OF described above, the
conditional probability corresponding to lateral separation = 10, forward separation =
12, lateral movement response = 3, forward movement response = 8, then
∑
k
P[OF
k
| vx=3, vy=8, lateralDx=10, forwardDy=12 ] = 100 (7)
Now we ask the question how to update the OF and maintain the normalization of the
conditional probability as in equation (7). The first idea would be to simply keep track
of the total number of updates N to equation 2 and divide the new summed total of
updates by N. But this also requires we keep track of the entire history of equation 2.
This would be a very cumbersome method. Instead, I have used another rather novel
way. The OF is maintained as a histogram with the total number of counts equal to one
hundred as shown in equation 6. When the OF is evaluated, the appropriate interval of
the histogram is incremented by one. Then to keep the histogram total count at 100,
another interval of the histogram is decremented by one. But which interval to
decrement? We decrement the interval which is at the opposite extreme. For example, if
the histogram is incremented in interval 7, then interval 1 is decremented assuming
interval 1 is greater than zero, otherwise interval 2 is decremented assuming interval 2 is
greater than zero, otherwise interval 3 is decremented, and so on. For another example,
if the OF evaluates so that interval 2 is incremented, then interval N (the highest
interval) is decremented assuming interval N is greater than zero, otherwise interval N-1
is decremented assuming interval N-1 is greater than zero, otherwise interval N-2 is
decremented, and so on. While this may appear to be a mechanism which could not
work or would limit the form of the objective function, the actual simulations to be
discussed hereafter show no such limiting.
Mentally picturing a five dimensional PMF as described is not easy. And I suspect that
my description of Objective Function Analysis will have fallen short of being a clear
explanation. If the reader is still interested at this point, then it is necessary that one
proceed to review and analyze the simulations to be presented.
Simulations
All of my simulations to date (circa July, 2019) are based upon an entity traversing
through an obstacle field. They differ only in the algorithm of the objective function. I
will also refer to the obstacle field as an obstacle course. The obstacle field consists of
four rows of obstacles. Obstacles are equally spaced apart. Every other row is staggered
relative to the first row such that there is no straight line path through the obstacle
course. The entity perceives only one obstacle at a time, that being the closest obstacle.
The obstacles are spaced sufficiently to allow the entity to clear the obstacle on either
side of the obstacle. The simulation is not intended to handle obstacles spaced less than
20 units apart, or in other words, there must be at least ten units laterally on either side
剩余28页未读,继续阅读
大英勋爵汉弗莱
- 粉丝: 35
- 资源: 4492
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0