Skip to content

Conversation

@Christoforos00
Copy link

In costFunction(theta, X, y) we don't need to transpose the array theta. In fact ,the implementation with theta.T in the sigmoid function works because in this case theta.T = theta . You can test it by print(theta , theta.T) which prints [0. 0. 0.] [0. 0. 0.]. In case we cas see the true transposition of theta with print(theta , theta[:, None]) which prints [0. 0. 0.]
[[0.]
[0.]
[0.]]. In this case the code would't run , so theta should not be transposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant