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

Rearranged files & fixed some errors #7

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

Conversation

SSSayon
Copy link

@SSSayon SSSayon commented Jul 14, 2024

  • Files rearranged ▪ commit e1ed5bb

    • Moved (and slightly modified accordingly) environment.yml & README.md from subdirectories of problem-sets-solutions/ to problem-sets/, so that learners can create their virtual environment at the start.
    • Added missing cs229-notes4.pdf back to the syllabus.
    • Removed ps0.pdf in materials/. It was already in problem-sets/.
    • Added supplement materials smo.pdf & smo-paper-platt.pdf to materials/. They are the missing files mentioned by Ng in class notes.
  • Typos & errors in PS solutions fixed ▪ commit 3bfc177

    • Added line breaks in three Python Jupiter notebooks where formulas failed to render due to missing line breaks between $$s.

    • In PS3/p04_gmm.py, the log-likelihood was computed incorrectly. Modified

      ll = np.sum(np.log(p_xz))

      to

      ll = np.sum(np.log(np.sum(p_xz, axis=1)))

      The code annotation in fact already gives the right one:

      # By log-likelihood, we mean `ll = sum_x[log(sum_z[p(x|z) * p(z)])]`.

      The incorrect version led to slow convergence in the report (and possibly WRONG convergence value).

    • In PS4/p06_cartpole.py, modified

      if expect_value[0] == expect_value[1]:
          return np.random.randint(2)
      else:
          return np.argmax(expect_value)

      to simply

      return np.argmax(expect_value)

      The incorrect version not only slowed down the speed of the program significantly, but caused the algorithm NEVER CONVERGE under some random seeds, as shown in the report. The randomness is unnecessary and actually fatal.

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