Page 157 - IJOCTA-15-1
P. 157
Modeling the renewable energy development in T¨urkiye with optimization
by the optimum solution:
e i = ˆy i (b) − y i , i = 1, . . . , M. (9) M N M
X X X
where ˆy i (b) is as defined in equation 3. Then, 2 (b 0 + b k x ki )x ki − 2 y i x ki = 0 (18)
SSE is calculated as follows: i=1 k=1 i=1
Rearranging the terms results in the following N
M
X 2 optimality conditions, for k = 1, ..., N:
SSE = (ˆy i (b) − y i ) (10)
M M
i=1 X X
which can be re-written as follows: b 0 x ki + b 1 x 1i x ki + ...
i=1 i=1
(19)
M M
M M M X X
X 2 X X 2 x Ni x ki =
SSE = ˆ y (b) − 2 ˆ y i (b)y i + y i (11) + b N y i x ki
i
i=1 i=1
i=1 i=1 i=1
Taking the derivative of this equation with respect Hence, the optimum solution of the MLR method,
to b 0 results in the following equations (12 to 15): is the one that satisfies equations 15 and 19.
M 2 M
∂SSE X ∂(ˆy (b)) X ∂(ˆy i (b)y i ) Appendix B. Analytical proof for
i
= − 2
∂b 0 ∂b 0 ∂b 0 optimal MAEOPT results
i=1 i=1
(12)
M 2
X ∂(y ) This section will provide the derivation of the an-
i
+ alytical equations that need to be solved in or-
∂b 0
i=1 der to find the optimum solution for MAEOPT.
In this equation, the last summation term be- MAEOPT is based on the minimization of the
2
comes 0 as y is not a function of b 0 . mean absolute error (MAE). Hence, in case of
i
M M unconstrained optimization (optimization with-
∂SSE X ∂(ˆy i (b)) X ∂(ˆy i (b))
= 2ˆy i (b) − 2 y i out considering the constraints), finding the opti-
∂b 0 ∂b 0 ∂b 0
i=1 i=1 mum values of b 0 and b k require the derivative of
(13) MAE to be taken with respect to b 0 and b k , and
∂(ˆy i (b)) ∂SSE
As is 1, and should be 0 for optimal- then being equated to 0. Solving those equations
∂b 0 ∂b 0
ity, the following equation should be satisfied by would yield the optimum values of b 0 and b k , in
the optimum solution: unconstrained optimization case. However, when
the constraints are considered, optimum solution
M N M
X X X should satisfy the Karush-Kuhn-Tucker (KKT)
2 (b 0 + b k x ki ) − 2 y i = 0 (14)
conditions. In order to clarify the difference be-
i=1 k=1 i=1
tween two methods (even when the constraints are
Rearranging the terms results in the following op-
timality condition: not considered), the derivation of optimality con-
ditions will be done both for unconstrained case
M M M
X X X (without considering constraints in equation 2)
Mb 0 + b 1 x 1i + ... + b N x Ni = y i (15)
and for the constrained case (by considering con-
i=1 i=1 i=1
straints in equation 2). The following subsections
Similarly, taking the derivative of SSE with re- show the related derivations for both cases.
spect to b k results in the following equations (16
to 19):
B.1. Unconstrained case
M 2 M
∂SSE X ∂(ˆy (b)) X ∂(ˆy i (b)y i ) MAE was previously defined in equation 1. Tak-
i
= − 2
∂b k ∂bk ∂b k ing the derivative of MAE with respect to b 0 re-
i=1 i=1
(16)
M sults in the following equations:
2
X ∂(y )
M
+ i ∂MAE 1 X ∂|ˆy i (b) − y i |
∂b k
i=1 = (20)
∂b 0 M ∂b 0
In this equation, the last summation term be- i=1
2
comes 0 again, as y is not a function of b k . By substituting the derivative of the absolute
i
value, the equation is updated as follows:
M M
∂SSE X ∂(ˆy i (b)) X ∂(ˆy i (b))
M
= 2ˆy i (b) − 2 y i ∂MAE 1 X ˆ y i (b) − y i ∂(ˆy i (b) − y i )
∂b k ∂b k ∂b k = (21)
i=1 i=1 M |ˆy i (b) − y i |
(17) ∂b 0 i=1 ∂b 0
∂(ˆy i (b)) ∂SSE
As is x ki , and should be 0 for opti- As the derivative of y i with respect to b 0 is 0 and
∂b k ∂b k ∂(ˆy i (b))
mality, the following equation should be satisfied is 1, substituting the definition of ˆy i (b) into
∂b 0
151

