Laboratory: Machine Learning
CSC 105 The Digital Age Spring 2009

Goals:

This laboratory will be an experiment in machine learning.

Part I: Creating Training Data

Exercise 1

  1. Open a Linux Terminal and type the following command:
    kolourpaint ~weinman/courses/CSC105/labs/blank.bmp &
    This should open a paint window with a (tiny) empty image in it.
  2. Enlarge the image to a reasonable viewing size (perhaps 600%) by clicking on the magnifying glass with a plus next to it, or using the pull-down menu on the top-right that reads 100%. DO NOT increase the size of the image by dragging on the squares in the corner. This will change the actual size of the image, which will foil our experiments.
  3. Click the "pencil" tool to the left of the image.
  4. Draw the letter we selected in class, filling most of the image canvas.
  5. From the menu, click File ~ Save As.
  6. Save it in your home directory (the default location) as lastname.bmp (using your own last name, of course).
  7. Return to your terminal, and use the following commands to copy that file to our central repository:
    chmod 644 lastname.bmp
    cp -p lastname.bmp ~weinman/courses/CSC105/labs/ml/train/pos
    

Exercise 2

  1. Return to kolourpaint.
  2. Erase the contents of the image by selecting Image ~ Clear from the menu (or Control+Shift+N).
  3. Using the pencil again, draw a different character of your choice.
  4. Save the file (using the same name; this will overwrite the previous version of your file).
  5. Return to your terminal, and use the following commands to copy that file to our central repository:
    chmod 644 lastname.bmp
    cp -p lastname.bmp ~weinman/courses/CSC105/labs/ml/train/neg
    

Part II: Creating Testing Data

Exercise 1

    1. Return to kolourpaint.
    2. Erase the contents of the image by selecting Image ~ Clear from the menu (or Control+Shift+N).
    3. Using the pencil again, draw another version of the character we chose in class.
    4. Save the file (using the same name; this will overwrite the previous version of your file).
    5. Return to your terminal, and use the following commands to copy that file to our central repository:
      chmod 644 lastname.bmp
      cp -p lastname.bmp ~weinman/courses/CSC105/labs/ml/test/pos
      

    Exercise 2

    1. Return to kolourpaint.
    2. Erase the contents of the image by selecting Image ~ Clear from the menu (or Control+Shift+N).
    3. Using the pencil again, draw a different character of your choice.
    4. Save the file (using the same name; this will overwrite the previous version of your file).
    5. Return to your terminal, and use the following commands to copy that file to our central repository:
      chmod 644 lastname.bmp
      cp -p lastname.bmp ~weinman/courses/CSC105/labs/ml/test/neg
      
    Created: Jerod Weinman, 8 May 2009