Coder Social home page Coder Social logo

ari-khoudary / cogs-205b Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joachimvandekerckhove/cogs-205b

0.0 0.0 0.0 5.76 MB

COGS 205B: Computational Lab Skills for Cognitive Scientists I

Shell 0.92% MATLAB 58.95% HTML 38.90% TeX 0.93% Makefile 0.26% M 0.04%

cogs-205b's Introduction

COGS 205B: Computational Lab Skills for Cognitive Scientists I

Instructor Information

Prof. Joachim Vandekerckhove

Course description

This course provides an in-depth introduction to writing MATLAB programs to run simulations and numerical experiments. Topics covered include program structure, random number generation, plotting, version control, basic model fitting, and numerical methods for integration and optimization. Weekly programming assignments will ensure that students master the techniques presented. Material includes working with linux-based remote computers and using common collaboration tools.

Weekly meeting time and place

Thursdays 1:00 - 3:50P via Zoom; or asynchronously as determined by the instructor.

Prerequisites

Must be comfortable with basic MATLAB and mathematical statistics at the level of one graduate course (e.g., COGS 203A/B, STATS 210, or equivalent).

Prerequisite: COGS 205A, or equivalent.

Assessment

Grades will be based on regular homework assignments. The homework should be done individually. The homework assignments have particular requirements. Your grade depends entirely on how much of the requirements you deliver by the assignment deadline. A grade of โ€˜Aโ€™ requires that all assignments are delivered on time and are functional.

Academic dishonesty

There is no tolerance for academic dishonesty or fraud. Any form of fraud designed to circumvent course policies will result in a failing grade. The professor makes no judgment calls regarding academic dishonesty. Any academic dishonesty, no matter how small, will be escalated to academic authorities.

Schedule

Unix

Topics

  • Using the command line on your machine
  • Accessing remote computers
  • Shell commands: cd, ls, cp, mv, rm, echo, alias, ln
  • Shell commands: wget, ssh, scp, sshfs, screen
  • Permissions: rwxrwxrwxd, dotfiles, sudo, ssh keys
  • Basic scripting: nano, grep, sed, #! ./
  • Bash variables
  • Version control with git
  • Markdown

Assignment: Write and run a shell script named <your-pseudonym>.sh that

  1. First clones the class git repository and makes a new branch
  2. Then makes a new directory /assignment/<your-pseudonym>/ in the git repository
  3. Makes a copy of itself in the new directory
  4. Pushes the updates to the git repository
  • Difficulty: your pseudonym appears in script only once

Learning goals

  • You will need to use these technologies to do and submit the assignments

MATLAB code organization

Topics

  • Functions and scripts
  • Reading and writing text files
  • Printing to the console
  • Getting input from the console
  • Calling system commands: system(), !
  • @classes and +packages

Learning goals

  • Understand different use cases of functions, scripts, @classes, and +packages
  • Know how to write code that interacts with the operating system and the console

Assignment: Make a +package called /+<your-pseudonym> with just a class @norm2d

  • @norm2d % implements the bivariate normal likelihood equivalence class
  • Include getters/setters and these six methods: (log)pdf, (log)cdf, rand, deviance
  • Avoid duplicating code

Good coding practice

Topics

  • Contractual programming
  • Unit testing
  • Continuous integration

Assignment: Add to your +package

  • Contents.m % prints help text for all functions
  • main.m % contains settings and runs the analysis
  • test.m % tests each function and method in the package
  • getData.m % downloads data from a url
  • readData.m % reads the data into variables
  • summary.m % computes summary statistics
  • report.m % prints a report to file in markdown format
  • Name the output file <your-pseudonym>-1.md and write it to the /reports directory

Learning goals

  • Understand how to implement contractual programming
  • Understand how to implement unit testing
  • Understand the principles of continuous integration
  • You will be expected to apply contractual programming and unit testing in all assignments going forward

Optimization I

Topics

  • Likelihood equivalence classes
  • Anonymous functions
  • Hill-climbing
  • Tabu search
  • Newton-Raphson
  • Nelder-Mead simplex

Assignment: Add to your +package

  • neldermead.m % finds optimum of a given function
  • Edit main.m so that after computing the summary statistics it also finds the maximum likelihood estimates of the bivariate normal parameters using the downloaded data
  • Edit report.m so it also prints out the MLEs
  • Name the output file <your-pseudonym>-2.md and write it to the /reports directory

Learning goals

  • Understand the different use cases of some numerical optimization techniques
  • Understand the inner workings of the Nelder-Mead algorithm

Numerical integration

Topics

  • Trapezoidal rule
  • Gaussian quadrature
  • Monte Carlo sampling

Analysis

Topics

  • Markov Chain Monte Carlo (MCMC) simulation
  • Summaries of distributions

Assignment

  • Estimate parameters of a Weibull function using psychometric data
  • Estimate parameters of a Gaussian psychometric function

Optimization II

Topics

  • Simulated annealing
  • Genetic algorithms

cogs-205b's People

Contributors

manuelvu avatar joachimvandekerckhove avatar lemontgomery2 avatar hojjatazimi avatar zhibinz2 avatar emgiovan avatar ari-khoudary avatar isaacmenchaca avatar brandonhackney avatar angelaashen avatar nb2499 avatar marjanrsd avatar kenwat1 avatar jiewan21 avatar adrifelcha avatar doreenhii avatar jackybeck avatar garrettmauter avatar joachim-student avatar cassfwolfe avatar tiffany-raber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.