Basic Probability: Programming

3 EC

Semester 1, period 2

53142BPC3Y

Owner Master Logic
Coordinator Gaelle Fontaine PhD
Part of Master Logic,

Course manual 2022/2023

Course content

This course is designed to provide students with the background in programming that is necessary to follow other more advanced master-level courses in areas such as linguistics, natural language processing, machine learning, etc. The goal is to make students that have had no prior exposure to programming feel comfortable with the basic concepts.

In this course, the students will be learning Python, a language that is now widely used in many fields. Combining their Python skills with the knowledge acquired during Basic Probability: Theory,  the students will also implement several basic machine learning algorithms.

Study materials

Literature

  • http://greenteapress.com/wp/think-python/

Other

  • Additional material will be communicated via canvas

Objectives

  • the student is able to use basic programming concepts, such as variables, conditions, loops, functions, lists, etc.
  • given the mathematical description of a simple algorithm, the student is able to implement that algorithm in python
  • the student is able to use some more advanced python specific concepts such as dictionaries, classes and inheritance
  • the student is able to use a library and to find information by himself/herself about a new library using the documentation
  • he student is able to find and fix basic programming errors in a program
  • the student can independently study and search both offline and online resources
  • the student is able to implement some very basic machine learning algorithms, using the concepts from the course ‘Basic probability: theory’

Teaching methods

  • Self-study
  • Laptop seminar

Every Monday, we publish the reading material for the week, together with a self-study programming notebook. Those notebooks contain very short easy programming exercises, so that the students can check their understanding of the reading material. The deadline for those notebooks is always on Thursday evening 7 pm.

In addition to those self-study notebooks, there will be 5 programming assignments covering some basic machine learning and text processing algorithms. Those are meant to be more complex applications of the concepts covered by the self-study notebooks. Typically students will have 10 days to complete a programming assignment and the deadline will be communicated via canvas. 

The lab sessions are on Friday and we start by discussing the self-study notebooks. Depending on the week, the session might also include a presentation of the algorithm of the current programming assignment or quizzes to be solved by teams of two. Those quizzes may count towards a final bonus point for the final grade. During the rest of the session, students can ask questions about their programming assignment.  

Learning activities

Activity

Number of hours

Lab sessions

14

Self-study

67

Exam

3

Total

84

Attendance

This programme does not have requirements concerning attendance (TER-B).

Assessment

Item and weight Details Remarks

Final grade

0.2 (20%)

Final exam

Must be ≥ 5.5Resit allowed

0.6 (60%)

Programming assignments

Resit not allowed

0.2 (20%)

Weekly notebooks for self-study

Resit not allowed

The exam is a digital open book exam and students are expected to bring their own computer (if this is not possible, the student needs to contact the course coordinator at least 2 weeks before the exam and we can provide a computer).  The exam is written as a jupyter notebook, which is the same format used for all the weekly and programming assignments. Students may use any resources , as long they do not use any tool to communicate with  each other.

For the programming assignments,  there is a penalty of 25% per day for late hand-ins, with a maximum cut-off of 2 days. This penalty may be waived in case of sickness, but an email from the studieadviseur is needed.

The deadline for the weekly self-study notebooks is strict, since we will discuss the solutions during the laptopcollege. 

Assignments

Cooperation among students for weekly self-study notebooks and for the programming assignments, is encouraged. However, after this discussion phase, every student writes down and submits his/her own individual solution.

The programming assignments are graded by the teaching assistant and students will receive written feedback.

The weekly self-study notebooks include self-tests for all the exercises, which means that students can verify by themselves the correctness of their code. We will start each laptopcollege by reviewing those notebooks and in particular, students will have the opportunity to ask about the exercises they did not manage to complete. The teaching assistant will grade those notebooks, but with  minimum written feedback.  

 

Fraud and plagiarism

The 'Regulations governing fraud and plagiarism for UvA students' applies to this course. This will be monitored carefully. Upon suspicion of fraud or plagiarism the Examinations Board of the programme will be informed. For the 'Regulations governing fraud and plagiarism for UvA students' see: www.student.uva.nl

Course structure

Weeknummer Onderwerpen
1 Variables, functions and control flow
2 Iteration and strings
3 Containers: list, dictionary, tuple
4 Classes and objects
5 Inheritance, naive Bayes classification
6

Numpy and matplotlib, k-means algorithm

7 Linear regression
8 Final exam

Timetable

The schedule for this course is published on DataNose.

Additional information

A prerequisite for the programming part is the material covered in the course Basic Probability: Theory (e.g. maximum likelihood estimation, naive Bayes). If you did not follow the course Basic Probability: Theory, please contact the course coordinator before registering. No prior programming knowledge is required

Contact information

Coordinator

  • Gaelle Fontaine PhD