Skip to content

Replace theta.T to theta#7

Open
Christoforos00 wants to merge 1 commit intosuraggupta:masterfrom
Christoforos00:master
Open

Replace theta.T to theta#7
Christoforos00 wants to merge 1 commit intosuraggupta:masterfrom
Christoforos00:master

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

Comments