W2 Quiz 1 | Exercise 6

Hi, I am taking this quiz and catch a problem at ex 6 about n_x features with dimension of X is (n_x, m), the explain had shown here: deep-learning-coursera/Week 2 Quiz - Neural Network Basics.md at master · Kulbear/deep-learning-coursera · GitHub
But I still cannot understand, please is there any one can explain it in more easy way for this?

Hello BaoGia,

Suppose we want to train a neural network model to classify whether a given customer deserves a 10% discount or not based on 2 features: Duration as a member and the number of purchases historically. For the sake of learning, let’s say we only have 3 customers (i.e. 3 examples) and 2 features to train the neural network model with:

Customer 1:

  • Duration as a member: 2 years
  • Number of purchases: 150 purchases

Customer 2:

  • Duration as a member: 4 years
  • Number of purchases: 100purchases

Customer 3:

  • Duration as a member: 10 years
  • Number of purchases: 500 purchases

Using the notation in the quiz, m = 3 (the number of customers as training data), n_x = 2 (the number of features being used)
The whole data is notated as an X matrix, with shapes of (2,3).
The inside of X would look like this:

[[150, 100, 500]
[2,4,10]]

Where it has a dimension of 2 n_x or number of features (depicted as rows) and 3 examples/customers (depicted as column)

I hope this clears things up for you. If you are still not sure, please let us know specifically which part of the question/answer you have difficulties understanding. :slightly_smiling_face:

Sincerely,

2 Likes

Thank you, now I can understand it more clearly. I was just confused on the notation n subscript lowercase x and X upper - number of example vector, I hope that it can change to n_X and it will be great if there is more clearly notation explanation for number of dataset has shown in X upper vector.
Anyway, thanks for the explanation