Machine Learning

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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s