05 Mar 2023

Posted on:

03 Jan 2023

0

# Dimension of vectors / matrix in the model

In the lecture, it is said that the dimension of every object in the model for multiple inputs and outputs Y = xw + b  are:
Y -> 'n x m',
xw -> 'n  x m'
b -> '1 x m'.
In algebra we cannot sum 2 matrix with different dimensions, therefore b should be 'n x m' too.
Am I wrong?

Posted on:

05 Mar 2023

0

the y = xw+b refers to a single linear model with one feature (x) if you have more feature (x1,x2) than you have w1,w2 but always only one b.

if you have multiple equatations in one model (y1,y2 aka outputs) then the first sentence adds up. they are different equatations working with the same feature set.

so if you ask about the weight matrix it is:  No of  featres (No of Xs) *  the No of equatations (No of Ys)

if you ask about the bias matrix it is: equal to the No of equatation (Ys) as every equatations has only one bias.

therefore No of Y = No of b

it is that simple no matter how many letters of the alfabet is involved in the explanation :)
{"ft_lang_label":"__label__en","ft_lang_prob":0.91341573,"math_prob":0.99763304,"size":964,"snap":"2023-40-2023-50","text_gpt3_token_len":262,"char_repetition_ratio":0.13541667,"word_repetition_ratio":0.010256411,"special_character_ratio":0.2665975,"punctuation_ratio":0.08095238,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99283785,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-21T09:05:42Z\",\"WARC-Record-ID\":\"<urn:uuid:6f4e3766-4275-444d-8bb8-1baed88c7c29>\",\"Content-Length\":\"106465\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:64e396ad-9609-44de-9363-6f114da19af9>\",\"WARC-Concurrent-To\":\"<urn:uuid:2942e95c-dfc0-45c3-81b3-94ac8f3c590c>\",\"WARC-IP-Address\":\"35.244.186.184\",\"WARC-Target-URI\":\"https://365datascience.com/question/dimension-of-vectors-matrix-in-the-model/\",\"WARC-Payload-Digest\":\"sha1:A7X6KZFLT336IHYIS3IMIGBMPNBYUKM4\",\"WARC-Block-Digest\":\"sha1:B7NWEICE4DEWDSI6XM3S7ZZCTCBF6P64\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233505362.29_warc_CC-MAIN-20230921073711-20230921103711-00741.warc.gz\"}"}