Regularized Logistic Regression

Train a model for classifying email messages as spam or non-spam and evaluate using train / test splitting and cross validation

Source Branch: lab_11
Due Date: Committed and pushed to git before April 29, 2020 at 11:59pm

Step 0: Ensure you have the new libraries

On your command prompt, make sure to install the new library if you don’t already have it:

conda install scikit-learn

This installs all the sklearn machine learning modules.

Step 1: Retrieve the lab using git

Using your command line, navigate to your stat207 repository (cd Desktop -> cd stat207 -> cd NETID, where you replacing NETID with your own actual netid). Fetch the notebook from our release repository by running the following two git commands:

git fetch release
git merge release/lab_11 -m "Merging initial files"

Note: after the first command ‘git fetch release’ you will be prompted for your netid and password unless these are already stored. So do not paste both commands into your command line together. Do each separately.

Step 2: Open the notebook

Open the notebook with the command:

jupyter notebook

Inside of the notebook webpage:

  • Navigate into lab_11
  • Open up the lab_11.ipynb notebook
  • Follow the instructions inside of the notebook

Whenever you are done, you should checkpoint (using File -> Save Checkpoint in the notebook) your notebook to save your work. Once your work is saved, you can:

  • Use File -> Close and Halt on the notebook
  • Use Quit (in the top-right) on the directory view to completely exit jupyter

Step 3: Submitting your work

When you’re ready to save your work online and/or submit your work, return to the command line and run:

git add -A
git commit -m "submission (or any message here)"
git push origin master

Submitting Your Work

When you have completed working, you should always submit your work (even if you're not quite finished). We will always grade the latest push you made before the due date (and ignore everything else) — submitting multiple times is okay and encouraged!

Inside of Jupyter:

  • Click File -> Save Checkpoint to ensure your notebook is saved.
  • Click File -> Close and Halt to exit your notebook.
  • Click Quit (in the top-right) to close the directory view.

After exiting Jupyter, your command prompt will return to accept new commands. Using your command prompt, run:

git add -A
git commit -m "submission (or any message here)"
git push origin master

You can verify your submission was made by visiting the web interface to github: