matrix multiplication and sum- single formula

a7n9

Well-known Member
Joined
Sep 15, 2004
Messages
696
Hello all,

This problem would be difficult to explain in words, so please have a look at this sheet
Book1
ABCDEFGHIJKLMNOPQ
1V111.800V10-0.019Zin10.846Zout10.700W10.276
20.48V122.297V20-1.859Zin2-0.757Zout20.319W21.627W0-0.240Ypred0.452
3V131.992V30-1.948Zin3-0.991Zout30.271W3-0.078
4
5Zin1=0.48*1.800+(-0.019)Zout1=1/(1+exp(-Zin1)
6Zin2=0.48*2.297+(-1.859)Zout2=1/(1+exp(-Zin2)Ypred=Zout1*0.276+Zout2*1.327+Zout3*(-0.078)+(-0.240)
7Zin3=0.48*1.992+(-1.948)Zout3=1/(1+exp(-Zin3)
Sheet1


I'm interested in calculating the last value "Ypred". Therefore, I need a single formula which would calculate the products and sums as explained in the calculations. I want to eliminate intermediate steps.

Thanks for your help.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi

=SUM(1/(1+EXP(-($A$2*C1:C3+E1:E3)))*K1:K3)+M2 array entered (ctrl, shift, enter)
or
=SUMPRODUCT(1/(1+EXP(-($A$2*C1:C3+E1:E3))),K1:K3)+M2

if you want to eliminate the formulas in column I.


Tony
 
Upvote 0
Thanks for your replies.

acw, both formuals work great, thanks. I was trying to accomplish the same thing but I wasn't able to put the 1/(1+exp(-x) thing properly. Man, you guys know some array formulas, which are hard to catch up.
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,769
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top