C1W2 - How X matrix represents m training examples

Hi Everyone.

I am new to the course and need some help. I am confused about the notations mentioned in C1W2 on the slide:

What confuses me is that in X, each training example x1, x2 and x3 is stacked as column and X will have m columns.

My understanding is different. Let’s take a housing example with 3 input features (No. of Bedrooms, Size, Location) and 1 output feature (Price). Let’s also assume we have 10 housing examples. Now if we stack up the 10 rows in X, we will have 10 rows x 3 features. However, Dr. Andrew mentions that X will have m columns (10 in this case) and nx rows (3 in this case). If someone can give an example by drawing, that will really help.

There is no standard on the orientation of the X matrix. For some datasets, the examples are in the rows. For others, they may be in the columns.

Yes I understand that there is no standard but I am trying to understand Dr. Andrew’s explanation. To simplify it further, as per Dr. Andrew, which of the following will apply for both X and Y:

1 Like

image and image,

in accordance with DLS’s convention, which is

image