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

Fixing test set loading and plots in PS2-5 Kernelizing\ the\ Perceptron.ipynb, and fixing source code loading in various Jupyter Notebooks #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lorenzorossi7
Copy link
Contributor

2 commits.

Description of the first one

In problem-sets/PS2/PS2-5 Kernelizing the Perceptron.ipynb:

  1. replaced line
    test_x, test_y = util.load_csv('data/ds5_train.csv')
    with correct line
    test_x, test_y = util.load_csv('data/ds5_test.csv')

  2. showing plots for the test set, as the train_perceptron function intends to do.

Description of the second one

In Jupyter notebooks, corrected all lines that import code from /src folders. For example, line

import problem_set_1.src.linear_model
is replaced by
import src.linear_model

This is the correct way to import code from /src given the folder structure used in this repository. Otherwise, the notebook fails to find the /src folder.

1. replaced line
test_x, test_y = util.load_csv('data/ds5_train.csv')
with correct line
test_x, test_y = util.load_csv('data/ds5_test.csv')

2. showing plots for the test set, as intended
…` folders. For example, line

import problem_set_1.src.linear_model
is replaced by
import src.linear_model

This is the correct way to import code from  `/src` with the folder structure used in this repository. Otherwise, the notebook fails to find the `/src` folder.
@lorenzorossi7
Copy link
Contributor Author

The first commit concludes the bug fixes discussed in a previous Pull Request (now closed): #8

@maxim5
Copy link
Owner

maxim5 commented Feb 14, 2025

Thanks for the contributions!

Unfortunately any small change to the notebook results in a huge unreadable diff. I'll try to review it asap.

@lorenzorossi7
Copy link
Contributor Author

I see the large diffs. I tried to avoid this and I committed when I was only seeing the actual change that I intentionally made (as described in the comments above) in my IDE, but it seems that GitHub detects a change in the metadata of Jupyter Notebooks anyway. I don't know how to avoid this. Any suggestion is welcome. In any case, take your time and thank your for your work. When you find time, you will see that the only relevant changes are those described in my messages above. Feel free to ask for further clarifications.

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.

2 participants