Assigment week 3

Had few questions from the assignment -

Additionally team, in the below where are we specifying we need 27 dimensional vector. Is it in the utils under File where we are specifying the degree ? How would we do it in a day to day when we dont have the coursera developed functions.

Do understand we are increasing to degree 6 but what does X_train [:,0], X_train[:,1] under map_feature mean ?- I am aware within the parantheses its the start,stop of the array but dont understand why are we calling column 0 and column 1 is it because we are adding features to both ?

Hey there!
Using y_train[:] instead of y_train ensures that a copy of the y_train array is passed to the function, rather than a reference to the original array.

1 Like

In real-world scenarios, finding the appropriate dimensions and degree of polynomial expansion involves experimentations and model performance evaluation. So, there is no exact number!

It depends on the implementation of the function. In this case, function gets 2 columns separately (as first and second arguments) and then applies the mapping.