Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about HW3 #28

Open
tianyueniu opened this issue Apr 23, 2020 · 2 comments
Open

Question about HW3 #28

tianyueniu opened this issue Apr 23, 2020 · 2 comments

Comments

@tianyueniu
Copy link

Dear TAs,

I have a question about hw3. When I try to run the logistic regression part, I am unable to run the line 'print(logistic_l1.score(np.stack(test_data_df['vect'], axis=0), test_data_df['category']))' without raising an error. In my understanding, it is caused by the fact that test_data_df['vect'] actually has different dimension than the previous train_data_df['vect'], because the todense() function created different dense matrices. In that case, is the given code correct? How should I change it to make it work?

Thank you so much!

@bhargavvader
Copy link

Hello @tianyueniu , ideally just running the same todense() functions on both train and test. But I don't see this error when I run the notebook on my machine: I have now uploaded a new version of HW3 with all the cells run until Section 3, and it runs fine... could you maybe try and pull the latest HW, try it again, and tell me if you get the same error?

@tianyueniu
Copy link
Author

Thank you so much @bhargavvader The updated notebook is working fine now!

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

No branches or pull requests

2 participants