Page 158 - IJOCTA-15-1
P. 158
N. Tekbıyık-Ersoy / IJOCTA, Vol.15, No.1, pp.137-154 (2025)
the equation, leads to the following equation (as should be formed. Considering the two aspects of
the derivative of MAE with respect to b 0 should MAEOPT, objective function (MAE) defined in
be 0): equation 1 and the constraints defined in equa-
M P N tion 2, the lagrangian can be written as follows:
b
1 X (b 0 + k=1 k x ki ) − y i = 0 (22)
M |(b 0 + P N b M M
k=1 k x ki ) − y i |
i=1 1 X X
L = |ˆy i (b) − y i | + λ i (ˆy i (b) − y i ) (28)
Reorganizing this equation leads to the final equa- M
i=1 i=1
tion, that should be satisfied by the optimal solu-
where λ i represents the shadow prices. With this
tion:
knowledge, the KKT optimality conditions can
M P N
X b 0 + b
k=1 k x ki be written as follows:
P N
|(b 0 + k=1 k x ki ) − y i |
b
i=1
∂L
M = 0 (29)
y i ∂b 0
X
=
P N
|(b 0 + k=1 k x ki ) − y i | ∂L
b
i=1 = 0 (30)
(23) ∂b k
Similarly, taking the derivative of MAE with re-
spect to b k results in the following equations (24 ˆ y i (b) − y i = 0 for i = 1, ..., M (31)
to 27):
Substituting the lagrangian defined in equation 28
M
∂MAE 1 X ∂|ˆy i (b) − y i | into equation 29 leads to the following equation:
= (24)
∂b k M ∂b k M M
i=1 1 X ∂|ˆy i (b) − y i | X ∂λ i (ˆy i (b) − y i )
By substituting the derivative of the absolute + = 0
M ∂b 0 ∂b 0
value, the equation is updated as follows. i=1 i=1
(32)
M
∂MAE 1 X ˆ y i (b) − y i ∂(ˆy i (b) − y i ) As the first term of this equation was previously
= (25) derived in equation 22 and as the derivative of
∂b k M |ˆy i (b) − y i | ∂b k
i=1
ˆ y i (b)−y i with respect to b 0 is 1, the equation that
As the derivative of y i with respect to b k is 0 should be satisfied for optimality can be written
and ∂(ˆy i (b)) is x ki , substituting the definition of as follows:
∂b k
ˆ y i (b) into the equation leads to the following equa- M P N M
b
1 X (b 0 + k=1 k x ki ) − y i X
tion (as the derivative of MAE with respect to b k P + λ i = 0
M |(b 0 + N b
should be 0): i=1 k=1 k x ki ) − y i | i=1
(33)
M P N
1 X (b 0 + k=1 k x ki ) − y i x ki = 0 (26) Now, the equations related with b k should be
b
M |(b 0 + P N b derived. Substituting the lagrangian defined in
k=1 k x ki ) − y i |
i=1
equation 28 into equation 30 leads to the follow-
Reorganizing this equation leads to the final equa-
tion set (related with b k for k = 1, ..., N), that ing equation:
M
M
should be satisfied by the optimal solution: 1 X ∂|ˆy i (b) − y i | X ∂λ i (ˆy i (b) − y i )
+ = 0
M P N M
b
X x ki (b 0 + k=1 k x ki ) i=1 ∂b k i=1 ∂b k
P N (34)
|(b 0 + k=1 k x ki ) − y i |
b
i=1 As the first term of this equation was previously
M
X y i x ki derived in equation 26 and as the derivative of
=
P N ˆ y i (b) − y i with respect to b 0 is x ki , the equation
|(b 0 + k=1 k x ki ) − y i |
b
i=1 that should be satisfied for optimality can be
(27)
Hence, the optimum solution of minimizing MAE, written as follows for all k, where k = 1, ..., N:
is the one that satisfies equations 23 and 27. M P N M
b
1 X (b 0 + k=1 k x ki ) − y i x ki + X λ i x ki = 0
B.2. Constrained case M |(b 0 + P N b
k=1 k x ki ) − y i |
i=1 i=1
(35)
As mentioned earlier in this section, when the
In addition to these, equation 31 means that for
constraints are considered, optimum solution
i=1,...,M (leading to M equation sets):
should satisfy the Karush-Kuhn-Tucker (KKT)
N
conditions, leading to an even smaller solution X
set. In order to derive the optimality condi- b 0 + b k x ki = y i (36)
tions for the constrained case, first, the lagrangian k=1
152

