CSCI4155/CSCS6505 (2014)

From Hallab
Revision as of 19:33, 27 November 2014 by Tt (talk | contribs) (→‎Assignment 7: Due: Presentation Dec 2, report Dec 3)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Machine Learning 2014

Instructors

Prof: Dr. Thomas Trappenberg

Office: Room 4216 in Mona Campbell Building on Coburg RD

Email: tt@cs.dal.ca

TA: Hassan Nikoo

Office hours: TBA and after appointment (write email)

Course Description

This course is an introduction to machine learning including theory and practical work with Pythons. The classes format will be highly interactive. Students have to read prescribed chapters of the course textbook and class time is mainly used for discussions, peer instructions, and project work.

Course Textbook

We will be following closely the following book, and readings are required and essential!!

Machine Learning: An Algorithmic Perspective Hardcover
by Stephen Marsland

The book should be available in the book store and at online sources.

http://www.amazon.ca/Machine-Learning-Algorithmic-Stephen-Marsland/dp/1420067184/ref=sr_1_1?ie=UTF8&qid=1408458067&sr=8-1&keywords=Machine-Learning-Algorithmic-Perspective-Recognition


Assignments

Assignments are posted here.
Late assignments are not excepted.

Assignment 1: Due Friday, Sept 19

a. Read the first three chapters of the textbook. [2]

b. Install Python on your computer and practice some basic programming with it. [2]

c. Solve Problems 2.1-2.8 of the textbook [2]

You need to send an email to prof4155@gmail.com with subject line "A1" by the end of Friday, Sept 19. In this email you must state for each part separately (a, b to c) that you have completed this part [2 points per part] have partially completed the part [1 points per part] or not worked on this assignment at all [0 points for each part]. Late submissions are not accepted.

Assignment 2: Due Tuesday, Sept 30, 4pm

1. Threshold perceptron:

Consider a neuron with 2 inputs, 1 output, and a threshold activation function. If the two weights are  and , 
and the bias is , then what is the output for all possible binary input combinations?

2. Sigmoidal perceptron:

Given is a sigmoidal perceptron with activation function   which we train on the 
error function  with gradient decent. 
a: Write down how the output  is calculated from an input vector . 
b: Derive the learning rule for this perceptron. 
Hint: the derivative of  is 

You need to send an email to prof4155@gmail.com with subject line "A2" by 4pm on Tuesday Sept 30 stating that you have or have not finished each part of the assignment.

Assignment 3: Due Thursday, October 9, 4pm

1. Reading for next week:

Chapter 4 and 5.

2. Assignments from book, all students:

Work though Problems 3.1, 3.2, 3.5 and 3.8 and send email to prof4155@gmail.com with subject A3 that you have completed 
each question. You should work on the last two questions in class. 

3. Additional assignment for grad students:

a: Solve Problem 3.6 and state in your submission email that you have completed this problem.  
b: Given is a classification problem where the examples of two classes are equally drawn from two Gaussians which have 
   the same variance of  while one class is drawn from a Gaussian with mean ,
   and the other class is drawn from a Gaussian with mean . Calculate analytically the maximal accuracy
   of classification and compare this to the performance of a perceptron. Attach the numerical values of the theoretical 
   and experimental accuracy to the email submission.


Assignment 4: Due Thursday, October 23, 4pm

Reading:

    Chapter 6 (need this for this assignment) and Chapter 8 for October 23.


CSCI 4155:

    This a group assignments where you should pair-up with another student of CSCI 4155.
    In this project you will evaluate the IRIS data set and compare different machine learning algorithms including the 
    Perceptron,   MLP, RBF, SVM and a decision tree. Use a k-fold crossvalidation to evaluate the performance. You should 
    submit a report of up to 3 pages that specifies the details of the algorithm used and discusses the results critically. 

CSCI 6505:

    This a group assignments where you should pair-up with another student of CSCI 6505.
    Choose your own dataset that you analyze with different machine learning algorithms that should including the Perceptron, 
    MLP, RBF, SVM and a decision tree. Use a k-fold crossvalidation to evaluate the performance. You should submit a report 
    of up to 3 pages that specifies the details of the algorithm used and discusses the results critically.


Assignment 5: Due Monday, November 3

Reading:

    Chapter 9

Document Classification with Naive Bayes Classifier:

In this assignment you have to implement a Naïve Bayes classier to classify 2 groups of documents. These groups of documents come
from  the "20 Newsgroups dataset" at http://qwone.com/~jason/20Newsgroups/ which is a well known example dataset. Our TA Hassan Nikoo 
has already preprocessed documents of two groups (alt.atheism and comp.graphics) and counted the number of words in each document. In 
the file NewsGroup.mat he separated training and test data. There are 4 variables in this file, TRAIN_DATA, TRAIN_LABEL, 
TEST_DATA, TEST_LABEL.  The TRAIN_DATA variable has 3 columns (DocumentID WordID WordCount). This variable tells you for any document
the different words and how many times each appeared in that document. The first 480 documents in this variable belong to the class 
number 1 and the rest belong to the other class as indicated in the column TRAIN_LABEL. 
Write a Naive Bayes classifier in Python or Matlab and report your results in maximal 1 page. Please also compare the results to 
a SVM classifier. 
NOTE 1: Some words can appear in the test documents that are not in the training data and vice versa. This problem can be 
mediated with Laplace Smoothing.
NOTE 2: Wikipedia has a nice summary of Naïve Bayes and even includes a section on document classification
NOTE 3: How to open a mat file in Python
 In order to open .mat files in python, you should use scipy.io. The following is an example of loading mat file into python :
 In [1]: import scipy.io
 In [2]: data = scipy.io.loadmat('NewsGroup.mat')
 In [3]: TRAIN_DATA = data['TRAIN_DATA']
 In [4]: TRAIN_LABEL = data['TRAIN_LABEL']
 In [5]: TRAIN_DATA.shape
 Out[5]: (131450, 3)

Assignment 6: Due Wednesday, November 12

Reading:

    Chapter 13

Unsupervised learning with IRIS dataset:

In this assignment you should explore different unsupervised learning algorithms. We will use the IRIS dataset here. 
You should implement the algorithms listed below and evaluate their performance. You can assume k=3.
Write up your findings (no page limit) and submit a pdf to prof4155@gmail.com with subject line A6.

a) Implement a simple perceptron (This is of course supervised learning but should give us some baseline)
b) Implement an autoencoder 
c) Implement the k-means algorithm 
d) Implement an online version (neural network version) of k-means
e) Implement a SOM with 12x12 nodes and mark the response of the winning node with a different symbol for each class, 
   where the size of the symbol should correspond to the frequency.

Assignment 7: Due: Presentation Dec 2, report Dec 3

Reinforcement learning:

The basic goal of this last assignment is to implement a tic-tac-toe game engine that learns through reinforcement learning. 
Implement a temporal difference learner and show how its performance change with learning. Discuss the relation of your 
method to another reinforcement learning procedure such as random sampling of actions. You need to present your results in class on Dec 2
and submit a written report in pdf format on Dec 3. Please send your report together with your programs to prof4155@gmail.com.  
Grad students: In addition to the basic tic-tac-toe game engine described above, apply a function approximator to represent 
the look-up table and discuss its performance in relation to the original method. Also, discuss the scaling properties of 
the algorithms by considering a connect-4 game engine.

A brief writeup of reinforcement learning that might help with understanding the different forms of reinforcement learning if given here.

Programming environment

We will be using Python, and the first two weeks of the course will include a Python tutorial. Links to relevant software will be placed here.

Resources

Data for further exercises. Use these for training: DataTrain and then predict the labels for these data: DataTest

Grading Scheme

Quizzes 50%, Assignments & Projects 50% There will be additional or different assignments and/or quiz questions for the ugrad and grad course. Some of the assignments are group work, but you have to pass all individual components in order to pass the course.

Academic Integrity & Plagiarism

(Based on the sample statement provided at http://academicintegrity.dal.ca. Written by Dr. Alex Brodsky.)

Please familiarize yourself with the university policy on Intellectual Honesty. Every suspected case will be reported.

At Dalhousie University, we respect the values of academic integrity: honesty, trust, fairness, responsibility and respect. As a student, adherence to the values of academic integrity and related policies is a requirement of being part of the academic community at Dalhousie University.


What does academic integrity mean?

Academic integrity means being honest in the fulfillment of your academic responsibilities thus establishing mutual trust. Fairness is essential to the interactions of the academic community and is achieved through respect for the opinions and ideas of others. Violations of intellectual honesty are offensive to the entire academic community, not just to the individual faculty member and students in whose class an offence occurs. (see Intellectual Honesty section of University Calendar)


How can you achieve academic integrity?

• Make sure you understand Dalhousies policies on academic integrity.

• Give appropriate credit to the sources used in your assignment such as written or oral work, com- puter codes/programs, artistic or architectural works, scientific projects, performances, web page designs, graphical representations, diagrams, videos, and images. Use RefWorks to keep track of your research and edit and format bibliographies in the citation style required by the instructor (http://www.library.dal.ca/How/RefWorks)

• Do not download the work of another from the Internet and submit it as your own.

• Do not submit work that has been completed through collaboration or previously submitted for another assignment without permission from your instructor. • Do not write an examination or test for someone else.

• Do not falsify data or lab results.

These examples should be considered only as a guide and not an exhaustive list.


What will happen if an allegation of an academic offence is made against you?

I am required to report a suspected offence. The full process is outlined in the Discipline flow chart, which can be found at: http://academicintegrity.dal.ca/Files/AcademicDisciplineProcess.pdf and in- cludes the following:

1. Each Faculty has an Academic Integrity Officer (AIO) who receives allegations from instructors.

2. The AIO decides whether to proceed with the allegation and you will be notified of the process.

3. If the case proceeds, you will receive an INC (incomplete) grade until the matter is resolved.

4. If you are found guilty of an academic offence, a penalty will be assigned ranging from a warning to a suspension or expulsion from the University and can include a notation on your transcript, failure of the assignment or failure of the course. All penalties are academic in nature.


Where can you turn for help?

• If you are ever unsure about ANYTHING, contact myself.

• The Academic Integrity website (http://academicintegrity.dal.ca) has links to policies, defini tions, online tutorials, tips on citing and paraphrasing.

• The Writing Center provides assistance with proofreading, writing styles, citations.

• Dalhousie Libraries have workshops, online tutorials, citation guides, Assignment Calculator, Ref- Works, etc.

• The Dalhousie Student Advocacy Service assists students with academic appeals and student discipline procedures.

• The Senate Office provides links to a list of Academic Integrity Officers, discipline flow chart, and Senate Discipline Committee.

Request for special accommodation

Students may request accommodation as a result of barriers related to disability, religious obligation, or any characteristic under the Nova Scotia Human Rights Act. Students who require academic accommodation for either classroom participation or the writing of tests and exams should make their request to the Advising and Access Services Center (AASC) prior to or at the outset of the regular academic year. Please visit www.dal.ca/access for more information and to obtain the Request for Accommodation – Form A.

A note taker may be required as part of a student’s accommodation. There is an honorarium of $75/course/term (with some exceptions). If you are interested, please contact AASC at 494-2836 for more information.

Please note that your classroom may contain specialized accessible furniture and equipment. It is important that these items remain in the classroom, untouched, so that students who require their usage will be able to participate in the class.