Understanding Dimensions – Linear, Logistic Regression

In the forums of the Coursera course “Machine Learning” by Andrew Ng, there are many questions regarding the dimensions of the input matrix and theta.

Here is an intuitive guide to understanding the dimensions. Click the link below!


Screen Shot 2020-02-23 at 10.36.33 PM

In Summary: 


The dimensions of your input matrix (X) is typically clear and driven from your data. 

[ # of examples, # of input variables ]

The dimensions of theta are driven from your input variables. In linear regression and binary classification, the number of outputs per example is typically 1:

[ # of input variables, # of outputs per example ]

Leave a Reply

Your email address will not be published. Required fields are marked *