├── .editorconfig ├── .gitignore ├── .travis.yml ├── README.md ├── build.sh ├── build └── templater.js ├── class-preview ├── fonts │ ├── copse-regular-webfont.eot │ ├── copse-regular-webfont.svg │ ├── copse-regular-webfont.ttf │ ├── copse-regular-webfont.woff │ ├── quattrocentosans-bold-webfont.eot │ ├── quattrocentosans-bold-webfont.svg │ ├── quattrocentosans-bold-webfont.ttf │ ├── quattrocentosans-bold-webfont.woff │ ├── quattrocentosans-bolditalic-webfont.eot │ ├── quattrocentosans-bolditalic-webfont.svg │ ├── quattrocentosans-bolditalic-webfont.ttf │ ├── quattrocentosans-bolditalic-webfont.woff │ ├── quattrocentosans-italic-webfont.eot │ ├── quattrocentosans-italic-webfont.svg │ ├── quattrocentosans-italic-webfont.ttf │ ├── quattrocentosans-italic-webfont.woff │ ├── quattrocentosans-regular-webfont.eot │ ├── quattrocentosans-regular-webfont.svg │ ├── quattrocentosans-regular-webfont.ttf │ └── quattrocentosans-regular-webfont.woff ├── images │ ├── background.png │ ├── body-background.png │ ├── bullet.png │ ├── checker.png │ ├── hr.gif │ └── octocat-logo.png ├── javascripts │ ├── main.js │ └── scale.fix.js └── params.json ├── data ├── assignments.yml ├── lectures.yml └── this-week.yml ├── deploy.sh ├── favicon.ico ├── fonts ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── gulpfile.js ├── images ├── barber-1x.jpg ├── barber-2x.jpg ├── barber-3x.jpg ├── barber-original.jpg ├── bishop-1x.jpg ├── bishop-2x.jpg ├── bishop-3x.jpg ├── bishop-original.jpg ├── boyd-1x.jpg ├── boyd-2x.jpg ├── boyd-original.jpg ├── hastie-1x.png ├── hastie-2x.jpg ├── hastie-3x.jpg ├── hastie-original.jpg ├── james-1x.jpg ├── james-2x.jpg ├── james-3x.jpg ├── james-original.jpg ├── murphy-1x.jpg ├── murphy-2x.jpg ├── murphy-3x.jpg ├── murphy-original.jpg └── people │ ├── bonnie.jpg │ ├── brian.jpg │ ├── daniel.jpg │ ├── david.jpg │ ├── jackie.jpg │ ├── kurt.jpg │ ├── kush.jpg │ ├── levent.jpg │ ├── lucy.jpg │ ├── peter.jpg │ ├── tian.jpg │ └── vikas.jpg ├── index.hbs ├── package.json ├── params.json ├── scripts └── navigation.js ├── styles ├── colors.styl ├── phone.styl ├── style.styl └── tablet-and-phone.styl └── templates ├── _assignment-details.hbs ├── _references.hbs ├── assignments.hbs ├── lectures.hbs └── this-week.hbs /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | trim_trailing_whitespace = true 9 | 10 | [*.{js,html,hbs}] 11 | indent_size = 4 12 | 13 | [{*.styl,*.yml}] 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dropbox 3 | .Rhistory 4 | desktop.ini 5 | Thumbs.db 6 | npm-debug.log 7 | *.*~ 8 | ~$* 9 | \#*\# 10 | 11 | *.css 12 | index.html 13 | out/ 14 | node_modules/ 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - stable 4 | script: bash ./deploy.sh 5 | env: 6 | global: 7 | - GH_REF: github.com/davidrosenberg/ml2016.git 8 | - secure: "su6cDBdofjR2nqZF/gqIVJ0IVOVYNcecYbCiMZNTViH7P0iYndE2raZSxtxR/OuRgdrfjYIv1UTicQIKsBqi0MjhwDqB4P1UIb46q2jObC948qAQAl/tgu8lyIke4FJJ/JmHIodIKU01XJUaQN0zFq7A54R9EBS6rsNvos2ylLoBNO5djkbCLGAppstxF87wJ/5pUzEkIv+k1CtxJUZv63cF6i0w2nDz6ey/1Ba8j7kMyK+/NheajewbLMPWlkh4kv3Rc1DFkCrxOYFTw0jFIBksgdc85MxBwvIOifdnX0v1uahl6e7C4coMcJjwpXhhgXtSKOIqpDbulAKk+QQ0vGKgIP6diQZL+9cdKnGKz4CXrbwg51Sks6ivz9z9Myob4H30lNV30JsF4UOkYdFAFJaBm7za5n5T0xCg6q84z1AJ9NuW/XhUOmgPM6S45YrsN4GLNZGsiciT9sdr/zkCMqFDi6svBHGmagSv5VMRvSgR2ds4xtgZsuLpw5XN1bZ9/y4Q/8QVe5sva9sayvoKvFhCnJfqo94Eg91JSTY5lc018fXUSidG7NXFi7MpTIr9gWWAKBPJhcWu9qeDcEid7Z4BnYGXaqiJRsSotPR7TCWZIffjHjHnZDSLHT5oFzn2XlmyL0ijDqlwuuhW9UQ6FVVbBGCKtaiZgu7LCwAehBM=" 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DS-GA 1003 Website 2 | 3 | ## Development info 4 | 5 | ### Building locally: quickstart 6 | 7 | Be sure to have [Node.js](https://iojs.org/) 5.x+ installed. 8 | 9 | Run `npm install` in the project root. This will install some build tools we use. 10 | 11 | Run `npm run watch` to start a watcher that will compile things in place. You can then view the site by simply opening `index.html`. 12 | 13 | Run `npm run build` to do a local build into the `out/` directory. You can then preview the site at `out/index.html`. This should usually be the same as just `index.html`, but it is good to check before committing, since the build process is slightly more complicated than the in-place watch process. 14 | 15 | ### Technologies used 16 | 17 | [Stylus](https://learnboost.github.io/stylus/) is used for styling. 18 | 19 | [Handlebars](http://handlebarsjs.com/) is used for templating. `index.hbs` is minimally templated, mostly delegating to the partials in `templates/`. Those pull their data from `data/`. The logic that ties them all together is in `build/templater.js`. 20 | 21 | [Gulp](http://gulpjs.com/) is used for a build/watch system. This is abstracted behind npm tasks though (`npm run watch`, `npm run build`). 22 | 23 | [Travis](https://travis-ci.org/) is used to build and deploy the website to gh-pages on each push, per [this guide](https://gist.github.com/domenic/ec8b0fc8ab45f39403dd). 24 | 25 | The site is intended to be responsive, which we accomplish with per-device stylesheets and media queries in the HTML. 26 | 27 | ### Things to Keep in Mind 28 | 29 | While editing you should be using an [EditorConfig](http://editorconfig.org/) plugin for your text editor to enforce a few basic stylistic things. 30 | 31 | We are trying to maintain a reasonable HTML document outline (so, don't use `
` as if it were `
`). To preview the document outline, use the [HTML 5 Outliner tool](https://gsnedders.html5.org/outliner/); here's [a direct link to the outline for the current version](https://gsnedders.html5.org/outliner/process.py?url=https%3A%2F%2Fdavidrosenberg.github.io%2Fml2016%2F%23home). 32 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e # exit with nonzero exit code if anything fails 3 | 4 | ## TODO migrate to gulp probably 5 | 6 | # clear and re-create the out directory 7 | rm -rf out || exit 0; 8 | mkdir out; 9 | 10 | rm -f index.html 11 | rm -rf styles/*.css 12 | 13 | npm run build-in-place 14 | 15 | cp index.html favicon.ico out/ 16 | 17 | mkdir out/styles/ 18 | cp styles/*.css out/styles/ 19 | 20 | cp -r images fonts scripts out/ 21 | 22 | echo "" 23 | find out/ -print 24 | echo "" 25 | -------------------------------------------------------------------------------- /build/templater.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const yaml = require('js-yaml'); 4 | const fs = require('fs'); 5 | const handlebarsFactory = require('handlebars'); 6 | const moment = require('moment'); 7 | const assert = require('assert'); 8 | const toSlug = require('slugg'); 9 | 10 | const SLIDES_AND_NOTES = 'Slides and Notes'; 11 | const REFERENCES_PRE = 'References (Pre)'; 12 | const REFERENCES_SUPPLEMENTAL = 'References (Supplemental)'; 13 | 14 | const TEMPLATES_DIR = path.resolve(__dirname, '../templates'); 15 | 16 | module.exports = (input, output) => { 17 | const handlebars = handlebarsFactory.create(); 18 | registerHelpers(handlebars); 19 | registerPartials(handlebars); 20 | 21 | const template = compileTemplate(handlebars, input); 22 | const documents = parseDocuments(); 23 | fs.writeFileSync(output, template(documents)); 24 | }; 25 | 26 | // Uncomment to see documents; useful while tweaking the templates 27 | // console.log(require("util").inspect(documents, { depth: Infinity })); 28 | 29 | function compileTemplate(handlebars, input) { 30 | return handlebars.compile(fs.readFileSync(input, { encoding: 'utf-8' })); 31 | } 32 | 33 | function parseDocuments() { 34 | const lectures = yaml.safeLoad(fs.readFileSync(path.resolve(__dirname, '../data/lectures.yml'))); 35 | 36 | // Pull Slides and Notes, References (Pre), and References (Supplemental) from the topics up to the top level: 37 | for (const lecture of lectures) { 38 | Object.keys(lecture.Events).forEach(eventDate => { 39 | const event = lecture.Events[eventDate]; 40 | 41 | ensureArrayExists(event, SLIDES_AND_NOTES); 42 | ensureArrayExists(event, REFERENCES_PRE); 43 | ensureArrayExists(event, REFERENCES_SUPPLEMENTAL); 44 | 45 | Object.keys(event.Topics).forEach(topic => { 46 | copyArrayInto(event.Topics[topic], event, SLIDES_AND_NOTES); 47 | copyArrayInto(event.Topics[topic], event, REFERENCES_PRE); 48 | copyArrayInto(event.Topics[topic], event, REFERENCES_SUPPLEMENTAL); 49 | }); 50 | }); 51 | } 52 | 53 | let assignmentsFrontmatter, assignments; 54 | let i = 0; 55 | yaml.safeLoadAll(fs.readFileSync(path.resolve(__dirname, '../data/assignments.yml')), doc => { 56 | switch (i) { 57 | case 0: 58 | assignmentsFrontmatter = doc; 59 | break; 60 | case 1: 61 | assignments = doc; 62 | break; 63 | default: 64 | throw new Error('Cannot have more than two documents in assignments.yaml'); 65 | } 66 | ++i; 67 | }); 68 | 69 | const thisWeek = yaml.safeLoad(fs.readFileSync(path.resolve(__dirname, '../data/this-week.yml'))); 70 | 71 | // Pull data from lectures and assignments into thisWeek: 72 | const thisWeekLecture = lectures.find(l => l.Title === thisWeek['Lecture/Lab']); 73 | const thisWeekAssignment = assignments.find(a => a.Label === thisWeek.Assignment); 74 | 75 | if (thisWeekLecture === undefined) { 76 | throw new Error(`Could not find entry in lectures.yml with Title "${thisWeek['Lecture/Lab']}" specified in ` + 77 | `this-week.yaml`); 78 | } 79 | if (thisWeekAssignment === undefined) { 80 | throw new Error(`Could not find entry in assignments.yml with Label "${thisWeek['Assignment']}" specified in ` + 81 | `this-week.yaml`); 82 | } 83 | 84 | thisWeek.lecture = thisWeekLecture; 85 | thisWeek.assignment = thisWeekAssignment; 86 | 87 | return { lectures, thisWeek, assignmentsFrontmatter, assignments }; 88 | } 89 | 90 | function registerPartials(handlebars) { 91 | for (const filename of fs.readdirSync(TEMPLATES_DIR)) { 92 | const filePath = path.resolve(TEMPLATES_DIR, filename); 93 | const partialName = path.basename(filename, '.hbs'); 94 | const contents = fs.readFileSync(filePath, { encoding: 'utf-8' }); 95 | 96 | handlebars.registerPartial(partialName, contents); 97 | } 98 | } 99 | 100 | function registerHelpers(handlebars) { 101 | handlebars.registerHelper('date', d => moment.utc(new Date(d).toISOString()).format('MMMM Do')); 102 | handlebars.registerHelper('shortDate', d => moment.utc(new Date(d).toISOString()).format('MMM D')); 103 | handlebars.registerHelper('maybeLink', v => { 104 | if (typeof v === 'string') { 105 | return v; 106 | } 107 | 108 | assert (typeof v === 'object' && v !== null, 'Links must be either strings or objects'); 109 | 110 | const keys = Object.keys(v); 111 | assert(keys.length === 1, 'Link objects must have a single key'); 112 | const key = keys[0]; 113 | 114 | return new handlebars.SafeString('' + key + ''); 115 | }); 116 | handlebars.registerHelper('lectureSlug', l => 'lecture-' + toSlug(l.Title)); 117 | handlebars.registerHelper('assignmentSlug', l => 'assignment-' + toSlug(l.Label)); 118 | } 119 | 120 | function ensureArrayExists(obj, prop) { 121 | if (!(prop in obj)) { 122 | obj[prop] = []; 123 | } 124 | } 125 | 126 | function copyArrayInto(source, dest, keyName) { 127 | if (source && source[keyName]) { 128 | dest[keyName].push(...source[keyName]); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /class-preview/fonts/copse-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/copse-regular-webfont.eot -------------------------------------------------------------------------------- /class-preview/fonts/copse-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/copse-regular-webfont.ttf -------------------------------------------------------------------------------- /class-preview/fonts/copse-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/copse-regular-webfont.woff -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bold-webfont.eot -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bold-webfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG webfont generated by Font Squirrel. 6 | Copyright : Copyright c 2011 Pablo Impallari wwwimpallaricomimpallarigmailcomCopyright c 2011 Igino Marini wwwikerncommailiginomarinicomCopyright c 2011 Brenda Gallo gbrenda1987gmailcomwith Reserved Font Name Quattrocento Sans 7 | Designer : Pablo Impallari 8 | Foundry : Pablo Impallari Igino Marini Brenda Gallo 9 | Foundry URL : wwwimpallaricom 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bold-webfont.ttf -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bold-webfont.woff -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bolditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bolditalic-webfont.eot -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bolditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bolditalic-webfont.ttf -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-bolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-bolditalic-webfont.woff -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-italic-webfont.eot -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-italic-webfont.ttf -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-italic-webfont.woff -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-regular-webfont.eot -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-regular-webfont.ttf -------------------------------------------------------------------------------- /class-preview/fonts/quattrocentosans-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/fonts/quattrocentosans-regular-webfont.woff -------------------------------------------------------------------------------- /class-preview/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/background.png -------------------------------------------------------------------------------- /class-preview/images/body-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/body-background.png -------------------------------------------------------------------------------- /class-preview/images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/bullet.png -------------------------------------------------------------------------------- /class-preview/images/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/checker.png -------------------------------------------------------------------------------- /class-preview/images/hr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/hr.gif -------------------------------------------------------------------------------- /class-preview/images/octocat-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/class-preview/images/octocat-logo.png -------------------------------------------------------------------------------- /class-preview/javascripts/main.js: -------------------------------------------------------------------------------- 1 | var sectionHeight = function() { 2 | var total = $(window).height(), 3 | $section = $('section').css('height','auto'); 4 | 5 | if ($section.outerHeight(true) < total) { 6 | var margin = $section.outerHeight(true) - $section.height(); 7 | $section.height(total - margin - 20); 8 | } else { 9 | $section.css('height','auto'); 10 | } 11 | } 12 | 13 | $(window).resize(sectionHeight); 14 | 15 | $(document).ready(function(){ 16 | $("section h1, section h2").each(function(){ 17 | $("nav ul").append("
  • " + $(this).text() + "
  • "); 18 | $(this).attr("id",$(this).text().toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g,'')); 19 | $("nav ul li:first-child a").parent().addClass("active"); 20 | }); 21 | 22 | $("nav ul li").on("click", "a", function(event) { 23 | var position = $($(this).attr("href")).offset().top - 190; 24 | $("html, body").animate({scrollTop: position}, 400); 25 | $("nav ul li a").parent().removeClass("active"); 26 | $(this).parent().addClass("active"); 27 | event.preventDefault(); 28 | }); 29 | 30 | sectionHeight(); 31 | 32 | $('img').load(sectionHeight); 33 | }); 34 | 35 | fixScale = function(doc) { 36 | 37 | var addEvent = 'addEventListener', 38 | type = 'gesturestart', 39 | qsa = 'querySelectorAll', 40 | scales = [1, 1], 41 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 42 | 43 | function fix() { 44 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 45 | doc.removeEventListener(type, fix, true); 46 | } 47 | 48 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 49 | fix(); 50 | scales = [.25, 1.6]; 51 | doc[addEvent](type, fix, true); 52 | } 53 | }; -------------------------------------------------------------------------------- /class-preview/javascripts/scale.fix.js: -------------------------------------------------------------------------------- 1 | fixScale = function(doc) { 2 | 3 | var addEvent = 'addEventListener', 4 | type = 'gesturestart', 5 | qsa = 'querySelectorAll', 6 | scales = [1, 1], 7 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 8 | 9 | function fix() { 10 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 11 | doc.removeEventListener(type, fix, true); 12 | } 13 | 14 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 15 | fix(); 16 | scales = [.25, 1.6]; 17 | doc[addEvent](type, fix, true); 18 | } 19 | 20 | }; -------------------------------------------------------------------------------- /class-preview/params.json: -------------------------------------------------------------------------------- 1 | {"name":"NYU Center for Data Science: DS-GA 1003","tagline":"Machine Learning and Computational Statistics (Spring 2016)","body":"### Hello\r\nI'm [David Rosenberg](https://www.linkedin.com/in/david-rosenberg-5982414), and I'll be the instructor for DS-GA 1003 this year. This is a temporary page to give you some information before the course begins (January 27, 2015). This year's class will be very similar to [last year's class](https://davidrosenberg.github.io/ml2015/), though some of the more advanced topics may change. \r\n\r\n### Prerequisites\r\n* **Programming**: You'll need to be comfortable with Python and [NumPy](http://www.numpy.org/), at least. Knowing how to generate plots and tables to summarize results will be necessary as well. You should take a look at the [first homework assignment from last year](https://davidrosenberg.github.io/ml2015/homework/hw1.pdf) to see what you'll be jumping into. For a crash course in Python for data science, the first few chapters of [Data Science from Scratch](http://amzn.com/149190142X) seem like a good bet. For more in depth coverage, including the [pandas library](http://pandas.pydata.org/), [Python for Data Analysis](http://amzn.com/1449319793) is worth a look. While pandas won't be particularly useful for the homework assignments, it's highly recommended for doing basic data analysis in practice and may be useful for your course projects. (If you're an R user, I highly recommend the [data.table](https://github.com/Rdatatable/data.table/wiki) package.)\r\n* **Math**: Your best bet would be to review the notes from the prerequisite class [DS-GA 1002](http://www.cims.nyu.edu/~cfgranda/pages/DSGA1002_fall15/notes.html). The priorities would be a review of matrix algebra (be comfortable with reading and manipulating expressions involving matrices, vectors, and norms), gradients, and basic probability theory (expectations, independence, Law of Large Numbers, conditional distributions, and conditional expectations). But I consider pretty much every part of the 1002 syllabus to be an important part of a data scientist's toolbox. \r\n* **Machine Learning**: You should at least be familiar with the basic notions of supervised learning, overfitting, training set, test set, and cross-validation. The course is designed to follow [DS-GA 1001](http://cds.nyu.edu/ds-ga-introduction-data-science-fall-2015/), and many of your peers will have taken this class. The book [Data Science for Business](http://www.amazon.com/Data-Science-Business-data-analytic-thinking/dp/1449361323) is highly recommended. It covers many important issues in practical data science that we don't have time for in this course. You might also consider working through [Andrew Ng's Machine Learning course](https://www.coursera.org/learn/machine-learning) on Coursera. Essentially any introduction to machine learning would be sufficient.\r\n\r\n### Textbooks\r\nWe won't have a main textbook for the class this year, and we'll focus on books that are free online. In addition to the books discussed on last year's website, I'll add the following recommendations:\r\n* David Barber's [Bayesian Reasoning and Machine Learning](http://web4.cs.ucl.ac.uk/staff/D.Barber/pmwiki/pmwiki.php?n=Brml.HomePage), available free online.\r\n* Christopher Bishop's [Pattern Recognition and Machine Learning](http://www.amazon.com/Pattern-Recognition-Learning-Information-Statistics/dp/0387310738), which is not available free online, though I have found it to be nice for several topics. \r\n\r\n### General Advice \r\n* This year's course lectures and homeworks will be similar to last year's. If you want to hit the ground running, it would not be a waste of time to start working on last year's homework assignments now.\r\n* The homework writeups must all be submitted as PDF files. There are many ways to do this, but it might be worth your time to figure out a way you're comfortable with before the class starts. For parts of the homework that are math heavy, you may want to use [LyX](http://www.lyx.org/) or write directly in [LaTeX](https://www.latex-project.org/). You can also write math directly in iPython, which can be convenient as well. ","google":"UA-64247420-2","note":"Don't delete this file! It's used internally to help with page regeneration."} -------------------------------------------------------------------------------- /data/assignments.yml: -------------------------------------------------------------------------------- 1 | Due time: 6pm 2 | Submit link: "https://newclasses.nyu.edu/portal" 3 | --- 4 | - 5 | Label: Homework 1 6 | Description: Ridge regression and SGD 7 | Due: 2016-02-05 8 | PDF: {hw1.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw1-sgd/hw1.pdf"} 9 | ZIP: {hw1.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw1.zip"} 10 | - 11 | Label: Homework 2 12 | Description: Lasso regression 13 | Due: 2016-02-16 14 | PDF: {hw2.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw2-lasso/hw2.pdf"} 15 | ZIP: {hw2.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw2.zip"} 16 | - 17 | Label: Homework 3 18 | Description: SVM and Sentiment Analysis 19 | Due: 2016-02-29 20 | PDF: {hw3.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw3-sentiment/hw3.pdf"} 21 | ZIP: {hw3.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw3.zip"} 22 | - 23 | Label: Homework 4 24 | Description: Linear Algebra, Kernels, Duality, and Trees 25 | Due: 2016-03-22 26 | PDF: {hw4.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw4-kernels/hw4.pdf"} 27 | ZIP: {hw4.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw4.zip"} 28 | - 29 | Label: Homework 5 30 | Description: Trees and Ensemble Methods 31 | Due: 2016-04-04 32 | PDF: {hw5.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw5-boosting/hw5.pdf"} 33 | ZIP: {hw5.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw5.zip"} 34 | - 35 | Label: Homework 6 36 | Description: Multiclass Hinge Loss and Multiclass SVM 37 | Due: 2016-04-11 38 | PDF: {hw6.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw6-multiclass/hw6.pdf"} 39 | ZIP: {hw6.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw6.zip"} 40 | - 41 | Label: Homework 7 42 | Description: Bayesian Methods and the Beta/Binomial Model 43 | Due: 2016-05-10 44 | PDF: {hw7.pdf: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw7-bayesian/hw7.pdf"} 45 | ZIP: {hw7.zip: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Homework/hw7.zip"} 46 | -------------------------------------------------------------------------------- /data/lectures.yml: -------------------------------------------------------------------------------- 1 | - 2 | Title: Week 1 3 | Events: 4 | 2016-01-27: 5 | Label: Lecture 6 | Video: "https://youtu.be/U6M0m9c9_Js" 7 | Topics: 8 | Course mechanics: 9 | References (Supplemental): 10 | - {KPM Ch 1: "http://www.cs.ubc.ca/~murphyk/MLbook/pml-intro-22may12.pdf"} 11 | Slides and Notes: 12 | - {Course Logistics: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/1a.course-logistics.pdf"} 13 | Statistical learning theory framework: 14 | Slides and Notes: 15 | - {Statistical Learning Theory: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/1b.intro-slt-riskdecomp.pdf"} 16 | Gradient and stochastic gradient descent: 17 | References (Supplemental): 18 | - {Bottou's SGD Tricks: "http://leon.bottou.org/papers/bottou-tricks-2012"} 19 | - BV Preface, Ch 1 20 | Slides and Notes: 21 | - {Stochastic Gradient Descent: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/1c.stoch-grad-descent.pdf"} 22 | 2016-01-28: 23 | Label: Lab 24 | Video: "https://www.youtube.com/watch?v=MEZiIfeqNNI" 25 | Topics: 26 | Matrix differentiation (Levent Sagun): 27 | References (Supplemental): 28 | - {Barnes's "Matrix Differentiation" notes: "http://www.atmos.washington.edu/~dennis/MatrixCalculus.pdf"} 29 | - {Felippa's "Matrix Calculus" chapter: "http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.AppC.d/IFEM.AppC.pdf"} 30 | Slides and Notes: 31 | - {Levent's Differentiation Slides: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Labs/1differentiation.pdf"} 32 | - {Matrix Differentiation: "https://davidrosenberg.github.io/ml2015/docs/matrix-differentiation.pdf"} 33 | - {Directional Derivatives and Approximation: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Notes/directional-derivative.pdf"} 34 | # References (Supplemental): 35 | # - {The Matrix Cookbook: "refs/matrixCookbook-15Nov2012.pdf"} 36 | - 37 | Title: Week 2 38 | Events: 39 | 2016-02-03: 40 | Label: Lecture 41 | Topics: 42 | Excess Risk Decomposition: 43 | # References (Pre): 44 | # - "KPM 16.2.1" 45 | Slides and Notes: 46 | - {Excess Risk Decomposition: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/2a.excess-risk-decomposition.pdf"} 47 | L1/L2 regularization: 48 | References (Supplemental): 49 | - "HTF Ch. 3" 50 | - {Bottou's SGD Tricks: "http://leon.bottou.org/papers/bottou-tricks-2012"} 51 | Slides and Notes: 52 | - {L1 and L2 regularization: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/2b.L1L2-regularization.pdf"} 53 | - {Completing the Square: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Notes/completing-the-square.pdf"} 54 | Optimization methods for Lasso: 55 | 2016-02-04: 56 | Label: Lab 57 | Topics: 58 | Elastic Net: 59 | Slides and Notes: 60 | - {Grouping and Elastic Net: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/2.Lab.elastic-net.pdf"} 61 | Directional Derivatives and Optima: 62 | References (Supplemental): 63 | - {Boyd's subgradient notes: "http://web.stanford.edu/class/ee364b/lectures.html"} 64 | Slides and Notes: 65 | - {Directional Derivatives and Optima: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/2.Lab.directional-derivatives.pdf"} 66 | - 67 | Title: Week 3 68 | Events: 69 | 2016-02-10: 70 | Label: Lecture 71 | Topics: 72 | Loss Functions: 73 | Slides and Notes: 74 | - {Loss functions: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/3a.loss-functions.pdf"} 75 | Convex Optimization: 76 | References (Pre): 77 | - {Warmup Exercises: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Notes/svm-lecture-prep.pdf"} 78 | Slides and Notes: 79 | - {Convex optimization: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/3b.convex-optimization.pdf"} 80 | - {Extreme Abridgement of BV: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Notes/convex-optimization.pdf"} 81 | References (Supplemental): 82 | - {Andrew Ng's CS229 SVM Notes: "http://cs229.stanford.edu/notes/cs229-notes3.pdf"} 83 | - BV Ch 1-5 84 | SVM: 85 | References (Supplemental): 86 | - "HTF 12.2.1 - 12.2.2" 87 | Slides and Notes: 88 | - {SVM (slides): "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/3c.SVM.pdf"} 89 | - {SVM (notes): "https://davidrosenberg.github.io/mlcourse/Archive/2016/Notes/svm-notes.pdf"} 90 | 91 | 2016-02-11: 92 | Label: Lab 93 | Topics: 94 | Projections: 95 | SVM (Geometric Motivation): 96 | References (Supplemental): 97 | - "HTF 3.2.0,4.5" 98 | - "HTF pp. 417-419" 99 | Slides and Notes: 100 | - {Projections and SVM: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Labs/3hardSVM.pdf"} 101 | - 102 | Title: Week 4 103 | Events: 104 | 2016-02-17: 105 | Label: Lecture 106 | Topics: 107 | SGD and GD Revisited: 108 | Slides and Notes: 109 | - {SGD and GD Revisited: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/4a.sgd-gd-revisited.pdf"} 110 | Subgradient descent: 111 | References (Supplemental): 112 | - {Boyd's subgradient notes: "http://web.stanford.edu/class/ee364b/lectures.html"} 113 | Slides and Notes: 114 | - {Subgradient Methods: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/4b.subgradient-descent.pdf"} 115 | Features: 116 | Slides and Notes: 117 | - {Features: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/4c.features.pdf"} 118 | 119 | 2016-02-18: 120 | Label: Lab 121 | Topics: 122 | Kernel Methods: 123 | Slides and Notes: 124 | - {Kernels: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/4d.kernels.pdf"} 125 | References (Supplemental): 126 | - "HTF 12.3.1" 127 | # - "KPM 14.2.1-14.2.6" 128 | 129 | - Title: Week 5 130 | Events: 131 | 2016-02-24: 132 | Label: Lecture 133 | Topics: 134 | Hilbert Spaces and Projections: 135 | Slides and Notes: 136 | - {Hilbert Spaces and Projections: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/5a.hilbert-space.pdf"} 137 | References (Supplemental): 138 | - "HTF 9.2" 139 | Kernel Methods: 140 | Slides and Notes: 141 | - {Kernels: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/5b.kernel-methods.pdf"} 142 | References (Supplemental): 143 | - {Shalev-Shwartz and Ben-David's Book (Ch 16): "http://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/copy.html"} 144 | - "HTF 12.3.1" 145 | # - "KPM 14.2.1-14.2.6" 146 | # - "KPM 16-16.2.4" 147 | 2016-02-25: 148 | Label: Lab 149 | Topics: 150 | Regression Trees: 151 | Slides and Notes: 152 | - {Regression Trees: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/5c.trees.pdf"} 153 | References (Supplemental): 154 | - "HTF 9.2" 155 | 156 | - Title: Week 6 157 | Events: 158 | 2016-03-02: 159 | Label: Lecture 160 | Topics: 161 | Classification Trees: 162 | Slides and Notes: 163 | - {Classification Trees: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/6a.classification-trees.pdf"} 164 | References (Supplemental): 165 | - "HTF 9.2" 166 | Review for One-Hour Test: [] 167 | 2016-03-03: 168 | Label: One-Hour Test 169 | Topics: [] 170 | 171 | - Title: Week 7 172 | Events: 173 | 2016-03-09: 174 | Label: Lecture 175 | Topics: 176 | Bootstrap and Bagging: 177 | Slides and Notes: 178 | - {"Bootstrap, Bagging, and Random Forests": "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/7a.bagging-random-forests.pdf"} 179 | References (Supplemental): 180 | - "HTF 8.7" 181 | Random Forests: 182 | References (Supplemental): 183 | - "HTF Ch. 15" 184 | Boosting: 185 | References (Supplemental): 186 | - "HTF Ch. 10" 187 | # - "KPM Ch. 16.4" 188 | Slides and Notes: 189 | - {Boosting: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/7b.boosting.pdf"} 190 | 2016-03-10: 191 | Label: Project Adviser Meetings 192 | Topics: [] 193 | 194 | - Title: Week 8 195 | Events: 196 | 2016-03-23: 197 | Label: Lecture 198 | Topics: 199 | Boosting: 200 | References (Supplemental): 201 | - "HTF Ch. 10" 202 | # - "KPM Ch. 16.4" 203 | Slides and Notes: 204 | - {Adaboost: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/8a.adaboost.pdf"} 205 | Gradient Boosting: 206 | References (Supplemental): 207 | - {Friedman's GBM Paper: http://statweb.stanford.edu/~jhf/ftp/trebst.pdf} 208 | - {Ridgeway's GBM Guide: http://www.saedsayad.com/docs/gbm2.pdf} 209 | Slides and Notes: 210 | - {Gradient Boosting: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/8b.gradient-boosting.pdf"} 211 | 2016-03-24: 212 | Label: Lab 213 | Topics: 214 | Variations on Gradient Boosting: 215 | Slides and Notes: 216 | - {More Boosting: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/8.Lab.more-boosting.pdf"} 217 | References (Supplemental): 218 | - {XGBoost Paper: http://arxiv.org/abs/1603.02754} 219 | - {"Bühlmann and Hothorn's Boosting Paper": https://projecteuclid.org/euclid.ss/1207580163} 220 | 221 | - Title: Week 9 222 | Events: 223 | 2016-03-30: 224 | Label: Lecture 225 | Topics: 226 | Multiclass Classification: 227 | Slides and Notes: 228 | - {Multiclass Classification: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/9a.multiclass.pdf"} 229 | References (Supplemental): 230 | - {Shalev-Shwartz and Ben-David's Book (Ch 17): "http://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/copy.html"} 231 | 232 | 2016-04-02: 233 | Label: Lab 234 | Topics: 235 | Midterm Exam Recap: 236 | 237 | 238 | - Title: Week 10 239 | Events: 240 | 2016-04-06: 241 | Label: Lecture 242 | Video: "https://www.youtube.com/watch?v=eqnO3jR4GWk" 243 | Topics: 244 | Conditional Probability Models: 245 | Slides and Notes: 246 | - {CitySense and CabSense: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/10a.citysense.pdf"} 247 | - {Conditional Probability Models: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/10b.conditional-probability-models.pdf"} 248 | 2016-04-07: 249 | Label: Lab 250 | Video: "https://www.youtube.com/watch?v=5nyRwIuqlME" 251 | Topics: 252 | Test Review: 253 | Slides and Notes: 254 | - {Test Review: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/10.Lab.test-review.pdf"} 255 | # References (Supplemental): 256 | # - {Part III of Andrew Ng's CS 229 Notes: http://cs229.stanford.edu/notes/cs229-notes1.pdf} 257 | 258 | 259 | - Title: Week 11 260 | Events: 261 | 2016-04-13: 262 | Label: Two-Hour Test 263 | Topics: [] 264 | 2016-04-14: 265 | Label: Project Adviser Meetings 266 | Topics: [] 267 | 268 | - Title: Week 12 269 | Events: 270 | 2016-04-20: 271 | Label: Lecture 272 | Video: "https://www.youtube.com/watch?v=RHA1hso0Dgg" 273 | Topics: 274 | Conditional Independence: 275 | Bayesian Networks: 276 | Naive Bayes: 277 | Slides and Notes: 278 | - {Bayesian Networks: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/12a.bayesian-networks.pdf"} 279 | Bayesian Methods: 280 | Slides and Notes: 281 | - {Bayesian Methods: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/12b.bayesian-methods.pdf"} 282 | 2016-04-21: 283 | Label: Lab 284 | Video: "https://www.youtube.com/watch?v=WCJu0yATu5o" 285 | Topics: 286 | Second Test Recap: 287 | 288 | - Title: Week 13 289 | Events: 290 | 2016-04-27: 291 | Label: Lecture 292 | Topics: 293 | Bayesian Regression: 294 | Slides and Notes: 295 | - {Bayesian Regression: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/13a.bayesian-regression.pdf"} 296 | k-means Clustering: 297 | Gaussian Mixture Models: 298 | Slides and Notes: 299 | - {k-means and Mixture Models: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/13b.mixture-models.pdf"} 300 | 2016-04-28: 301 | Label: Lab 302 | Topics: 303 | EM Algorithm: 304 | Slides and Notes: 305 | - {EM Algorithm: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/13.Lab.EM-algorithm.pdf"} 306 | References (Supplemental): 307 | - {Vaida's EM convergence paper: "http://www3.stat.sinica.edu.tw/statistica/oldpdf/a15n316.pdf"} 308 | 309 | - Title: Week 14 310 | Events: 311 | 2016-05-04: 312 | Label: Lecture 313 | Topics: 314 | EM Algorithm (continued): 315 | Slides and Notes: 316 | - {EM Algorithm: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/14a.EM-algorithm.pdf"} 317 | Neural Networks: 318 | Slides and Notes: 319 | - {Neural Networks: "https://davidrosenberg.github.io/mlcourse/Archive/2016/Lectures/14b.neural-networks.pdf"} 320 | 2016-05-05: 321 | Label: Project Adviser Meetings 322 | Topics: [] 323 | 324 | - Title: Week 15 325 | Events: 326 | 2016-05-11: 327 | Label: Poster Session (In CDS, 6-8pm) 328 | Topics: [] 329 | -------------------------------------------------------------------------------- /data/this-week.yml: -------------------------------------------------------------------------------- 1 | Lecture/Lab: Week 15 2 | Assignment: Homework 7 3 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e # exit with nonzero exit code if anything fails 3 | 4 | # Put stuff in the out directory 5 | npm run build 6 | 7 | # go to the out directory and create a *new* Git repo 8 | cd out 9 | git init 10 | 11 | # inside this git repo we'll pretend to be a new user 12 | git config user.name "Travis CI" 13 | git config user.email "d@domenic.me" 14 | 15 | # The first and only commit to this new Git repo contains all the 16 | # files present with the commit message "Deploy to GitHub Pages". 17 | git add . 18 | git commit -m "Deploy to GitHub Pages" 19 | 20 | # Force push from the current repo's master branch to the remote 21 | # repo's gh-pages branch. (All previous history on the gh-pages branch 22 | # will be lost, since we are overwriting it.) We redirect any output to 23 | # /dev/null to hide any sensitive credential data that might otherwise be exposed. 24 | git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 25 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/favicon.ico -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const templater = require('./build/templater.js'); 3 | const fs = require('fs'); 4 | const gulp = require('gulp'); 5 | const gutil = require('gulp-util'); 6 | const gulpStylus = require('gulp-stylus'); 7 | 8 | const STYLUS = 'styles/*.styl'; 9 | const TEMPLATES = '**/*.hbs'; 10 | const MAIN_TEMPLATE = 'index.hbs'; 11 | const DATA = 'data/*.yml'; 12 | 13 | const OUTPUT_HTML = 'index.html'; 14 | const OUTPUT_STYLES = 'styles/'; 15 | 16 | gulp.task('template', () => { 17 | try { 18 | templater(MAIN_TEMPLATE, OUTPUT_HTML) 19 | } catch (e) { 20 | // Delete the index.html file to make it clear that the templating failed 21 | deleteIfExists(OUTPUT_HTML); 22 | 23 | gutil.log(gutil.colors.red(`Deleting ${OUTPUT_HTML} since templating failed`)); 24 | throw e; 25 | } 26 | }); 27 | 28 | gulp.task('stylus', () => 29 | gulp.src(STYLUS) 30 | .pipe(gulpStylus()) 31 | .pipe(gulp.dest(OUTPUT_STYLES)) 32 | ); 33 | 34 | gulp.task('build', ['template', 'stylus']); 35 | 36 | gulp.task('watch', ['template', 'stylus'], () => { 37 | gulp.watch([TEMPLATES, DATA], ['template']); 38 | gulp.watch(STYLUS, ['stylus']) 39 | }); 40 | 41 | function deleteIfExists(filename) { 42 | try { 43 | fs.unlinkSync(filename); 44 | } catch (e) { 45 | if (e.code !== 'ENOENT') { 46 | throw e; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /images/barber-1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/barber-1x.jpg -------------------------------------------------------------------------------- /images/barber-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/barber-2x.jpg -------------------------------------------------------------------------------- /images/barber-3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/barber-3x.jpg -------------------------------------------------------------------------------- /images/barber-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/barber-original.jpg -------------------------------------------------------------------------------- /images/bishop-1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/bishop-1x.jpg -------------------------------------------------------------------------------- /images/bishop-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/bishop-2x.jpg -------------------------------------------------------------------------------- /images/bishop-3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/bishop-3x.jpg -------------------------------------------------------------------------------- /images/bishop-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/bishop-original.jpg -------------------------------------------------------------------------------- /images/boyd-1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/boyd-1x.jpg -------------------------------------------------------------------------------- /images/boyd-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/boyd-2x.jpg -------------------------------------------------------------------------------- /images/boyd-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/boyd-original.jpg -------------------------------------------------------------------------------- /images/hastie-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/hastie-1x.png -------------------------------------------------------------------------------- /images/hastie-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/hastie-2x.jpg -------------------------------------------------------------------------------- /images/hastie-3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/hastie-3x.jpg -------------------------------------------------------------------------------- /images/hastie-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/hastie-original.jpg -------------------------------------------------------------------------------- /images/james-1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/james-1x.jpg -------------------------------------------------------------------------------- /images/james-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/james-2x.jpg -------------------------------------------------------------------------------- /images/james-3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/james-3x.jpg -------------------------------------------------------------------------------- /images/james-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/james-original.jpg -------------------------------------------------------------------------------- /images/murphy-1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/murphy-1x.jpg -------------------------------------------------------------------------------- /images/murphy-2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/murphy-2x.jpg -------------------------------------------------------------------------------- /images/murphy-3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/murphy-3x.jpg -------------------------------------------------------------------------------- /images/murphy-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/murphy-original.jpg -------------------------------------------------------------------------------- /images/people/bonnie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/bonnie.jpg -------------------------------------------------------------------------------- /images/people/brian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/brian.jpg -------------------------------------------------------------------------------- /images/people/daniel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/daniel.jpg -------------------------------------------------------------------------------- /images/people/david.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/david.jpg -------------------------------------------------------------------------------- /images/people/jackie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/jackie.jpg -------------------------------------------------------------------------------- /images/people/kurt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/kurt.jpg -------------------------------------------------------------------------------- /images/people/kush.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/kush.jpg -------------------------------------------------------------------------------- /images/people/levent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/levent.jpg -------------------------------------------------------------------------------- /images/people/lucy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/lucy.jpg -------------------------------------------------------------------------------- /images/people/peter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/peter.jpg -------------------------------------------------------------------------------- /images/people/tian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/tian.jpg -------------------------------------------------------------------------------- /images/people/vikas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidrosenberg/ml2016/b070e759efebf10e14a8de2eb9b17aede2448d51/images/people/vikas.jpg -------------------------------------------------------------------------------- /index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DS-GA 1003: Machine Learning and Computational Statistics, Spring 2016 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 28 | 29 |
    30 |

    31 | Machine Learning and Computational Statistics 32 | 33 | DS-GA 1003 · Spring 2016 · 34 | NYU Center for Data Science 35 | 36 |

    37 | 38 | 39 | 40 | 43 | 44 | 47 | 48 | 51 | 52 | 55 | 56 | 58 | 59 | 61 |
    Instructor 41 | David Rosenberg 42 |
    Lecture 45 | Wednesdays 7:10pm–9pm, Warren Weaver Hall 109 46 |
    Lab 49 | Thursday 7:10pm–8pm, Warren Weaver Hall 109 50 |
    Office Hours 53 | Instructor: Thursday 8pm–9pm, Warren Weaver Hall 109 54 |
    TA: Wednesdays 2pm–3pm, Warren Weaver Hall 605 57 |
    Graders: Tuesdays 2pm–4pm in the CDS common area 60 |
    62 | 63 | {{> this-week thisWeek }} 64 |
    65 |
    66 |

    About This Course

    67 | 68 |
    69 |

    This course covers a wide variety of topics in machine learning and statistical modeling. While mathematical methods and theoretical aspects will be covered, the primary goal is to provide students with the tools and principles needed to solve the data science problems found in practice. This course also serves as a foundation on which more specialized courses and further independent study can build.

    70 | 71 |

    This course was designed as part of the core curriculum for the Center for Data Science's Masters degree in Data Science. Other interested students who satisfy the prerequisites are welcome to take the class as well. Note that class is intended as a continuation of DS-GA-1001 Intro to Data Science, which covers some important, fundamental data science topics that may not be explicitly covered in this DS-GA class (e.g. data cleaning, cross-validation, and sampling bias).

    72 | 73 |

    This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, graders, and the instructor. Rather than emailing questions to the teaching staff, you are encouraged to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com. 74 | 75 | 76 |

    Other information:

    77 | 84 | 85 |
    86 | 87 |
    88 |

    Prerequisites

    89 |
      90 |
    • DS-GA-1001: Intro to Data Science or its equivalent 91 |
    • DS-GA-1002: Statistical and Mathematical Methods or its equivalent 92 |
    • Solid mathematical background, equivalent to a 1-semester undergraduate course in each of the following: linear algebra, multivariate calculus (primarily differential calculus), probability theory, and statistics. (The coverage in DS-GA 1002 is sufficient.) 93 |
    • Python programming required for most homework assignments. 94 |
    • Recommended: Computer science background up to a "data structures and algorithms" course 95 |
    • Recommended: At least one advanced, proof-based mathematics course 96 |
    • Some prerequisites may be waived with permission of the instructor. 97 |
    98 |
    99 |
    100 |

    Grading

    101 |

    Homework (40%) + One-Hour Test (15%) + Two-Hour Test (25%) + Project (20%)

    102 |

    103 | Many homework assignments will have problems designated as “optional”. At the end of the semester, strong performance on these problems may lift the final course grade by up to half a letter grade (e.g. B+ to A- or A- to A), especially for borderline grades. You should view the optional problems primarily as a way to engage with more material, if you have the time. Along with the performance on optional problems, we will also consider significant contributions to Piazza and in-class discussions for boosting a borderline grade. 104 |

    105 |
    106 | 107 |
    108 |

    Important Dates

    109 |
      110 |
    • First test (50 min) Thursday, March 3rd, 7:10-8pm.
    • 111 |
    • Second test (110 min) Wednesday, April 13th, 7:10-9pm.
    • 112 |
    • See Assignments section for homework-related deadlines.
    • 113 |
    • See Project section for project-related deadlines.
    • 114 |
    115 |
    116 | 117 | 118 |
    119 | 120 |
    121 |

    Resources

    122 | 123 |
    124 |

    Textbooks

    125 | 126 | The cover of Elements of Statistical Learning 127 | 128 | The cover of An Introduction to Statistical Learning 129 | 130 | The cover of Bayesian Reasoning and Machine Learning 131 | 132 | The cover of Pattern Recognition and Machine Learning 133 | 134 | The cover of Machine Learning: a Probabilistic Perspective 135 | 136 | The cover of Convex Optimization 137 | 138 |
    139 | 140 |
    The 141 | Elements of Statistical Learning (Hastie, Friedman, and Tibshirani) 142 |
    This will be our principal textbook for the first part of the course. It's written by three statisticians who invented many of the techniques discussed. Despite its popularity and the pretty pictures, this is not an easy book. There's an easier version of this book that covers many of the same topics, described below. (Available for free as a PDF.) 143 | 144 |
    An Introduction to Statistical Learning (James, Witten, Hastie, and Tibshirani) 145 |
    This book is written 146 | by two of the same authors as The Elements of Statistical Learning. It's much less intense mathematically, and it's good for a lighter introduction to the topics. (Available for free as a PDF.) 147 | 148 |
    Bayesian Reasoning and Machine Learning (David Barber) 149 |
    We'll use this as a reference for probabilistic modeling, including Bayesian methods, and Bayesian networks. (Available for free as a PDF.) 150 | 151 |
    Pattern Recognition and Machine Learning (Christopher Bishop) 152 |
    This book is another very nice reference for probabilistic models and beyond. It's highly recommended. 153 | 154 |
    Machine Learning: A Probabilistic Perspective (Kevin P. Murphy) 155 |
    This book covers an unusually broad set of topics, including recent advances in the field. As such, it's a great reference to have, particularly if you continue your study of data science beyond this course. That said, it was the required textbook for this course in 2015, and many students found it a bit overwhelming. It's really intended as a comprehensive, PhD-level textbook. 156 | 157 |
    Convex Optimization (Boyd and Vandenberghe) 158 |
    This book was an instant hit in the machine learning community when it was published in 2004. We will be making light use of this book, mostly for its coverage of Lagrangians and duality. However, it's a good book to get familiar with, as it's very well written, and it covers a lot of techniques used in more advanced machine learning literature. (Available for free as a PDF.) 159 | 160 |
    161 |
    162 | 163 |
    164 |

    Other tutorials and references

    165 | 166 |

    (If you find additional references that you recommend, please share them on Piazza and we can add them here.) 167 | 168 |

    176 |
    177 | 178 |
    179 |

    Software

    180 | 181 |
      182 |
    • NumPy is "the fundamental package for scientific computing with Python." Our homework assignments will use NumPy arrays extensively. 183 |
    • scikit-learn is a comprehensive machine learning toolkit for Python. We won't use this for most of the homework assignments, since we'll be coding things from scratch. However, you may want to run the scikit-learn version of the algorithms to compare the outputs to your own, as a check. Besides that, it should be useful for many final projects, and studying the source code can be a good learning experience. One of the core developers, Andreas Müller, is a Research Engineer in NYU's Center for Data Science. 184 | 185 |
    • CVXPY and CVXOPT are for solving convex optimization problems in Python. Could be useful for checking your homework results. 186 |
    187 |
    188 |
    189 | 190 |
    191 |

    Lectures

    192 | 193 | 198 | 199 | {{> lectures lectures }} 200 |
    201 |
    202 |

    Assignments

    203 | 204 |
    205 |

    Homework Submission: Homework should be submitted through NYU Classes. 206 | 207 |

    Late Policy: Homeworks are due at {{assignmentsFrontmatter.[Due time]}} on the date specified. Homeworks will still be accepted for 48 hours after this time but will have a 20% penalty. 208 | 209 |

    Collaboration Policy: You may discuss problems with your classmates. However, you must write up the homework solutions and the code from scratch, without referring to notes from your joint session. In your solution to each problem, you must write down the names of any person with whom you discussed the problem—this will not affect your grade. 210 |

    211 | 212 | {{> assignments assignments }} 213 |
    214 | 215 |
    216 |

    Project

    217 |
    218 |

    Overview

    219 |

    The project is your opportunity for in-depth engagement with a data science problem. In job interviews, it's often your course projects that you end up discussing, so it has some importance even beyond this class. That said, it's better to pick a project that you will be able to go deep with (in terms of trying different methods, feature engineering, error analysis, etc.), than choosing a very ambitious project that requires so much setup that you will only have time to try one or two approaches.

    220 |
    221 |
    222 |

    Key Dates

    223 |
      224 |
    • Feb 29 (Mon 6pm): Deadline for choosing project groups
    • 225 |
    • March 10 (Thur 7-9pm): First meeting with advisers. Each group will give a 5-minute "pitch" of their project idea to their assigned project adviser. The adviser may give immediate feedback or ask follow-up questions.
    • 226 |
    • March 24 (Thurs 6pm): Project Proposals Due
    • 227 |
    • Apr 14th (Thurs 7-9pm): Second meeting with advisers
    • 228 |
    • May 5th (Thurs 7-9pm): Third meeting with advisers
    • 229 |
    • May 11th (Wed 6-8pm): Project Poster Session
    • 230 |
    • May 13th, 6pm: Final Project Reports Due
    • 231 |
    232 |
    233 |
    234 |

    Guidelines for Project Topics

    235 |

    A good project for this class is one that's a real "problem", in the sense that you have something you want to accomplish, and it's not necessarily clear from the beginning the best approach. The techiques used should be relevant to our class, so most likely you will be building a prediction system. A probabilistic model would also be acceptable, though we will not be covering these topics until later in the semester.

    236 | 237 |

    To be clear, the following approaches would be less than ideal: 238 |

      239 |
    1. Finding an interesting ML algorithm, implementing it, and seeing how it works on some data. This is not appropriate because I want your choice of methods to be driven by the problem you are trying to solve, and not the other way around.
    2. 240 |
    3. Choosing a well-known problem (e.g. MNIST digit classification or the Netflix problem) and trying out some of our ML methods on it. This is better than the previous example, but with a very well-established dataset, a lot of the most important and challenging parts of real-world data science are left out, including defining the problem, defining the success metric, and finding the right way to encode the data.
    4. 241 |
    5. Choosing a problem related to predicting stock prices. Historically, these projects are the most troubled. Interestingly, our project advisers who have worked at hedge funds are the ones who advise against this most strongly.
    6. 242 |
    243 |

    244 |
    245 |
    246 |

    Project proposal guidelines

    247 |

    The project proposal should be roughly 2 pages, though it can be longer if you want to include figures or sample data that will be helpful to your presentation. Your proposal should do the following:

    248 |
      249 |
    1. Clearly explain the high-level problem you are trying to solve. (e.g. Predict movie ratings, predict the outcome of a court case, find a low-dimensional characterization of input examples.)
    2. 250 |
    3. Identify the data set or data sets that you will be using. You should give a clear description of the characteristics of the data (how many examples, what kinds of features do we have for each example, are there issues with missing data or bad data, etc.).
    4. 251 |
    5. How will you evaluate performance? In certain settings, you may want to try a few different performance measures.
    6. 252 |
    7. Identify a few "baseline algorithms". These are simple algorithms for solving the problem, such as always predicting the majority class for a classification problem, using a small set of decision rules designed by hand, or using a ridge regression model on a basic feature set. Ideally, you will be able to report the performance of a couple baseline algorithms in your proposal, though this is not necessary. The goal will be to beat the baseline, so if the baseline is already quite high, you will have a challenge.
    8. 253 |
    9. What methods do you plan to try to solve your problem, along with a rough timeline. Methods include data preprocessing, feature generation, and the ML models you'll be trying. Once you start your investigation, it's best to use an iterative approach, where the method you choose next is based on an understanding of the results of the previous step.
    10. 254 |
    255 |
    256 |
    257 |

    Some Public Data Sets (just to get you thinking)

    258 | 275 |
    276 |
    277 |
    278 |

    People

    279 | 280 |
    281 |

    Instructor

    282 | 283 |
    284 | A photo of David Rosenberg 285 |
    286 |

    David Rosenberg 287 |

    David is a data scientist in the office of the CTO at Bloomberg L.P. Formerly he was Chief Scientist of YP Mobile Labs at YP. 289 |

    290 |
    291 |
    292 | 293 |
    294 |

    Teaching Assistant

    295 | 296 |
    297 | A photo of Levent Sagun 298 |
    299 |

    Levent Sagun 300 |

    Levent is a PhD student at the Courant Institute of Mathematical Sciences. 302 |

    303 |
    304 |
    305 | 306 |
    307 |

    Graders

    308 | 309 |
      310 |
    • 311 | A photo of Peter Li 312 |
      313 |

      Peter Li (Head Grader) 314 |

      Peter is a second year student in the Data Science program at NYU. 316 |

      317 | 318 |
    • 319 | A photo of Lucy Wang 320 |
      321 |

      Lucy Wang 322 |

      Lucy is a Master's student in Data Science at NYU. She is also working as an investor and in-house data scientist at Greycroft Partners, a venture capital firm making investments in early-stage tech companies. 324 |

      325 | 326 |
    • 327 | A photo of Jacqueline Gutman 328 |
      329 |

      Jacqueline Gutman 330 |

      Jackie is a second-year student in the Center for Data Science. She currently works as a researcher on educational measurement issues in computer-supported collaborative learning and has experience in statistical consulting. 332 |

      333 | 334 | 335 |
    • 336 | A photo of Tian Wang 337 |
      338 |

      Tian Wang 339 |

      Tian is a second year student in the Data Science program at NYU. 341 |

      342 |
    343 |
    344 | 345 |
    346 |

    Project Advisers

    347 | 348 |
      349 | 356 |
    • 357 | A photo of Daniel Chen 358 |
      359 |

      Daniel L. Chen

      360 |

      Daniel is at the Institute for Advanced Studies 361 | in Toulouse and Toulouse School of Economics. He is a former Chair of Law and Economics at 362 | ETH Zurich (2012-2015), Duke Assistant Professor of Law, Economics, and Public Policy (2010-2012), and Kauffman Fellow at the University of Chicago Law School (2009-2010).

      363 |
    • 364 |
    • 365 | A photo of Brian Dalessandro 366 |
      367 |

      Brian d'Alessandro

      368 |

      Brian is Director of Data Science at Zocdoc, and he was formerly the VP of Data Science at Dstillery. He is also an Adjunct Professor of Data Science at NYU Stern School of Business.

      369 |
    • 370 |
    • 371 | A photo of Kurt Miller 372 |
      373 |

      Kurt Miller

      374 |

      Kurt is a researcher at the quantitative hedge fund PDT Partners.

      375 |
    • 376 | 377 |
    • 378 | A photo of Bonnie Ray 379 |
      380 |

      Bonnie Ray

      381 |

      382 | Bonnie is VP Data Science at Pegged Software. Prior to Pegged, she was Director, Cognitive Algorithms, at IBM Research and has also served on the faculty at the New Jersey Institute of Technology.

      383 |
    • 384 | 385 |
    • 386 | A photo of Kush R. Varshney 387 |
      388 |

      Kush R. Varshney

      389 |

      Kush is a research staff member at IBM Research and a data ambassador with DataKind.

      390 |
    • 391 | 392 |
    393 |
    394 |
    395 | 396 | 399 | 400 | 401 | 402 | 412 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dsga1003", 3 | "private": true, 4 | "scripts": { 5 | "stylus": "stylus styles/", 6 | "watch": "gulp watch", 7 | "build-in-place": "gulp build", 8 | "build": "bash ./build.sh" 9 | }, 10 | "devDependencies": { 11 | "gulp": "^3.8.10", 12 | "gulp-stylus": "^2.0.0", 13 | "gulp-util": "^3.0.3", 14 | "handlebars": "^2.0.0", 15 | "js-yaml": "^3.2.5", 16 | "moment": "^2.9.0", 17 | "slugg": "^1.0.0", 18 | "stylus": "0.49.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /params.json: -------------------------------------------------------------------------------- 1 | {"name":"NYU Center for Data Science: DS-GA 1003","tagline":"Machine Learning and Computational Statistics (Spring 2016)","body":"### Hello\r\nI'm [David Rosenberg](https://www.linkedin.com/in/david-rosenberg-5982414), and I'll be the instructor for DS-GA 1003 this year. This is a temporary page to give you some information before the course begins (January 27, 2015). This year's class will be very similar to [last year's class](https://davidrosenberg.github.io/ml2015/), though some of the more advanced topics may change. \r\n\r\n### Prerequisites\r\n* **Programming**: You'll need to be comfortable with Python and [NumPy](http://www.numpy.org/), at least. Knowing how to generate plots and tables to summarize results will be necessary as well. You should take a look at the [first homework assignment from last year](https://davidrosenberg.github.io/ml2015/homework/hw1.pdf) to see what you'll be jumping into. For a crash course in Python for data science, the first few chapters of [Data Science from Scratch](http://amzn.com/149190142X) seem like a good bet. For more in depth coverage, including the [pandas library](http://pandas.pydata.org/), [Python for Data Analysis](http://amzn.com/1449319793) is worth a look. While pandas won't be particularly useful for the homework assignments, it's highly recommended for doing basic data analysis in practice and may be useful for your course projects. (If you're an R user, I highly recommend the [data.table](https://github.com/Rdatatable/data.table/wiki) package.)\r\n* **Math**: Your best bet would be to review the notes from the prerequisite class [DS-GA 1002](http://www.cims.nyu.edu/~cfgranda/pages/DSGA1002_fall15/notes.html). The priorities would be a review of matrix algebra (be comfortable with reading and manipulating expressions involving matrices, vectors, and norms), gradients, and basic probability theory (expectations, independence, Law of Large Numbers, conditional distributions, and conditional expectations). But I consider pretty much every part of the 1002 syllabus to be an important part of a data scientist's toolbox. \r\n* **Machine Learning**: You should at least be familiar with the basic notions of supervised learning, overfitting, training set, test set, and cross-validation. The course is designed to follow [DS-GA 1001](http://cds.nyu.edu/ds-ga-introduction-data-science-fall-2015/), and many of your peers will have taken this class. The book [Data Science for Business](http://www.amazon.com/Data-Science-Business-data-analytic-thinking/dp/1449361323) is highly recommended. It covers many important issues in practical data science that we don't have time for in this course. You might also consider working through [Andrew Ng's Machine Learning course](https://www.coursera.org/learn/machine-learning) on Coursera. Essentially any introduction to machine learning would be sufficient.\r\n\r\n### Textbooks\r\nWe won't have a main textbook for the class this year, and we'll focus on books that are free online. In addition to the books discussed on last year's website, I'll add the following recommendations:\r\n* David Barber's [Bayesian Reasoning and Machine Learning](http://web4.cs.ucl.ac.uk/staff/D.Barber/pmwiki/pmwiki.php?n=Brml.HomePage), available free online.\r\n* Christopher Bishop's [Pattern Recognition and Machine Learning](http://www.amazon.com/Pattern-Recognition-Learning-Information-Statistics/dp/0387310738), which is not available free online, though I have found it to be nice for several topics. \r\n\r\n### General Advice \r\n* This year's course lectures and homeworks will be similar to last year's. If you want to hit the ground running, it would not be a waste of time to start working on last year's homework assignments now.\r\n* The homework writeups must all be submitted as PDF files. There are many ways to do this, but it might be worth your time to figure out a way you're comfortable with before the class starts. For parts of the homework that are math heavy, you may want to use [LyX](http://www.lyx.org/) or write directly in [LaTeX](https://www.latex-project.org/). You can also write math directly in iPython, which can be convenient as well. ","google":"UA-64247420-2","note":"Don't delete this file! It's used internally to help with page regeneration."} -------------------------------------------------------------------------------- /scripts/navigation.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | var nav = document.querySelector('body > nav'); 4 | var sections = Array.prototype.slice.call(document.querySelectorAll('body > section')); 5 | 6 | window.addEventListener('hashchange', setSelectedLink); 7 | window.addEventListener('scroll', setHashFromScroll); 8 | 9 | if (!window.location.hash) { 10 | setHashFromScroll(); 11 | } 12 | setSelectedLink(); 13 | 14 | function setSelectedLink() { 15 | var selected = nav.querySelector('a.selected'); 16 | if (selected) { 17 | selected.classList.remove('selected'); 18 | } 19 | 20 | nav.querySelector('a[href="' + window.location.hash + '"]').classList.add('selected'); 21 | } 22 | 23 | function setHashFromScroll() { 24 | var bodyScrollTop = document.body.scrollTop || document.documentElement.scrollTop; 25 | var minDifference = +Infinity; 26 | var minSectionId; 27 | 28 | sections.forEach(function (section) { 29 | var difference = Math.abs(section.offsetTop - bodyScrollTop); 30 | if (difference < minDifference) { 31 | minDifference = difference; 32 | minSectionId = section.id; 33 | } 34 | }); 35 | 36 | // Don't want to scroll to the section directly since we are already inside a user scroll handler. 37 | history.replaceState({}, '', '#' + minSectionId); 38 | setSelectedLink(); 39 | } 40 | }()); 41 | -------------------------------------------------------------------------------- /styles/colors.styl: -------------------------------------------------------------------------------- 1 | accent = #5082e5 2 | accent-hover = lighten(accent, 30%) 3 | gray = #D9D9D9 4 | body-color = #444444 5 | bg-gray = #f8f7f8 6 | -------------------------------------------------------------------------------- /styles/phone.styl: -------------------------------------------------------------------------------- 1 | @import "colors" 2 | 3 | nav-height = 60px 4 | 5 | body 6 | padding = 10px 7 | padding: padding 8 | padding-bottom: padding + nav-height 9 | 10 | body > nav 11 | width: 100% 12 | height: nav-height 13 | top: initial 14 | bottom: 0 15 | display: flex 16 | 17 | > a 18 | width: auto 19 | flex: 0 0 16.6666666666666% 20 | border-bottom: none 21 | border-right: 1px solid accent-hover 22 | touch-action: manipulation 23 | 24 | &:hover 25 | width: auto 26 | 27 | #this-week 28 | display: inline-block 29 | width: initial 30 | 31 | > h1 32 | text-align: center 33 | 34 | .week-summary 35 | display: inline-block 36 | 37 | section 38 | display: block 39 | padding-right: 30px 40 | margin-bottom: 20px 41 | min-width: initial 42 | max-width: initial 43 | 44 | &:last-child 45 | margin-bottom: 0 46 | 47 | #home 48 | padding-top: 20px 49 | 50 | > h1 51 | text-align: center 52 | margin-bottom: 40px 53 | 54 | > span 55 | &, .department 56 | margin-top: 10px 57 | font-size: 12px 58 | .department 59 | margin-top: 5px 60 | display: block 61 | 62 | p 63 | label-width = 145px 64 | span 65 | display: inline-block 66 | width: "calc(100% - %s)" % label-width 67 | 68 | strong 69 | width: label-width 70 | 71 | #textbooks 72 | img 73 | max-width: 30% 74 | width: auto 75 | height: auto 76 | margin-right: 5px 77 | 78 | #lectures > section 79 | > h1 80 | font-size: 24px 81 | 82 | .date 83 | display: inline-block 84 | 85 | .topics, .references 86 | padding-right: 0 87 | 88 | > section 89 | display: block 90 | 91 | &:not(:last-child) 92 | margin-bottom: 20px 93 | border-bottom: 2px solid gray 94 | 95 | > div 96 | display: block 97 | margin-bottom: 25px 98 | padding-top: 0 99 | 100 | &:first-of-type 101 | padding-left: 0 102 | margin-bottom: 15px 103 | 104 | h1 105 | margin-bottom: 0 106 | font-size: 18px 107 | 108 | .references, .slides 109 | h1 110 | padding-left: 20px 111 | 112 | .icon 113 | &.references, &.slides 114 | &::before 115 | top: 0 116 | left: 0 117 | 118 | margin-top: -6px 119 | 120 | font-size: 14px 121 | 122 | #assignments .homework 123 | strong 124 | display: inline-block 125 | 126 | .deadline, .files 127 | width: auto 128 | 129 | .module > * 130 | display: block 131 | padding-bottom: 10px 132 | 133 | .files > * 134 | margin-right: 10px 135 | 136 | #people 137 | ul 138 | display: block 139 | 140 | .person 141 | display: block 142 | width: auto 143 | flex-basis: auto 144 | margin-right: 0 145 | 146 | > img 147 | float: left 148 | -------------------------------------------------------------------------------- /styles/style.styl: -------------------------------------------------------------------------------- 1 | @import "colors" 2 | 3 | nav-width = 60px 4 | body-padding = 40px 5 | body-left = nav-width + body-padding 6 | module-padding = 20px 7 | 8 | font-largest = 9 | font-size: 46px 10 | 11 | @media(max-width: 420px) 12 | font-size: 24px 13 | 14 | font-large = 15 | font-size: 36px 16 | 17 | @media(max-width: 420px) 18 | font-size: 20px 19 | 20 | font-medium = 21 | font-size: 20px 22 | 23 | @media(max-width: 420px) 24 | font-size: 16px 25 | 26 | font-small = 27 | font-size: 16px 28 | 29 | @media(max-width: 420px) 30 | font-size: 14px 31 | 32 | font-smallest = 33 | font-size: 14px 34 | 35 | @font-face 36 | font-family: "Glyphicons Halflings" 37 | src: url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"), 38 | url("../fonts/glyphicons-halflings-regular.woff") format("woff") 39 | 40 | icon-home = 41 | content: "\e021" 42 | icon-info-sign = 43 | content: "\e086" 44 | icon-calendar = 45 | content: "\e109" 46 | icon-list = 47 | content: "\e012" 48 | icon-star = 49 | content: "\e006" 50 | icon-user = 51 | content: "\e008" 52 | icon-book = 53 | content: "\e043" 54 | icon-pencil = 55 | content: "\270f" 56 | icon-envelope = 57 | content: "\2709" 58 | icon-new-window = 59 | content: "\e164" 60 | icon-save = 61 | content: "\e166" 62 | icon-video = 63 | content: "\e059" 64 | 65 | 66 | *, *::before, *::after 67 | margin: 0 68 | padding: 0 69 | box-sizing: border-box 70 | 71 | body 72 | padding: body-padding 73 | padding-left: body-left 74 | padding-top: 0 75 | line-height: 1.6em 76 | 77 | color: body-color 78 | font-family: Helvetica, Arial, sans-serif 79 | 80 | background-color: bg-gray 81 | 82 | a 83 | text-decoration: none 84 | color: accent 85 | 86 | &:hover 87 | color: accent-hover 88 | 89 | h1 90 | text-transform: uppercase 91 | line-height: normal 92 | 93 | p 94 | margin: 16px 0 95 | 96 | {font-small} 97 | line-height: 1.6em 98 | 99 | &:first-child 100 | margin-top: 0 101 | 102 | &:last-child 103 | margin-bottom: 0 104 | 105 | .module 106 | background: white 107 | border-radius: 8px 108 | padding: module-padding 109 | box-shadow: 0 0 5px rgba(0,0,0,0.12) 110 | 111 | .icon 112 | &::before 113 | font-family: "Glyphicons Halflings" 114 | opacity: 0.4 115 | margin-right: 10px 116 | vertical-align: middle 117 | color: accent 118 | 119 | &.pdf::before 120 | {icon-new-window} 121 | 122 | &.zip::before 123 | {icon-save} 124 | 125 | body > nav 126 | position: fixed 127 | top: 0 128 | left: 0 129 | z-index: 2 130 | 131 | width: nav-width 132 | height: 100% 133 | 134 | background-color: accent 135 | box-shadow: 0 0 10px rgba(0,0,0,0.3) 136 | 137 | > a 138 | position: relative 139 | 140 | display: block 141 | width: 60px 142 | height: nav-width 143 | padding: 10px 10px 10px 10px 144 | box-sizing: border-box 145 | border-bottom: 1px solid accent-hover 146 | 147 | {font-smallest} 148 | font-weight: bold 149 | letter-spacing: .03em 150 | text-transform: uppercase 151 | text-align: left 152 | color: white 153 | white-space: nowrap 154 | line-height: 42px 155 | 156 | background-color: accent 157 | overflow: hidden 158 | transition: width ease .2s, color ease .2s, background-color ease .2s 159 | 160 | &:hover 161 | width: 200px 162 | box-shadow: 0 0 5px rgba(0,0,0,0.3) 163 | 164 | color: white 165 | 166 | &.selected 167 | border-bottom: none 168 | 169 | color: accent 170 | 171 | background: white 172 | 173 | &::before 174 | float: left 175 | 176 | display: inline-block 177 | width: nav-width 178 | height: nav-width 179 | margin: -10px 15px 0 -10px 180 | 181 | {font-medium} 182 | font-family: "Glyphicons Halflings" 183 | font-style: normal 184 | font-weight: normal 185 | letter-spacing: normal 186 | line-height: 60px 187 | text-align: center 188 | vertical-align: middle 189 | -webkit-font-smoothing: antialiased 190 | -moz-osx-font-smoothing: grayscale 191 | 192 | &[href="#home"]::before 193 | {icon-home} 194 | &[href="#about"]::before 195 | {icon-info-sign} 196 | &[href="#resources"]::before 197 | {icon-book} 198 | &[href="#lectures"]::before 199 | {icon-calendar} 200 | &[href="#assignments"]::before 201 | {icon-list} 202 | &[href="#project"]::before 203 | {icon-star} 204 | &[href="#people"]::before 205 | {icon-user} 206 | 207 | body > section 208 | border-bottom: 1px solid gray 209 | padding-bottom: 70px 210 | padding-top: 20px 211 | 212 | > h1 213 | margin-bottom: 40px 214 | 215 | {font-large} 216 | 217 | > section:not(:last-of-type) 218 | margin-bottom: 30px 219 | 220 | > section > h1 221 | margin-bottom: 10px 222 | 223 | {font-medium} 224 | 225 | #home 226 | text-align: center 227 | padding-top: body-padding 228 | 229 | > h1 230 | {font-largest} 231 | text-align: left 232 | 233 | margin-bottom: 50px 234 | 235 | > span 236 | display: block 237 | margin-top: 5px 238 | 239 | {font-medium} 240 | 241 | .department 242 | {font-small} 243 | vertical-align: middle 244 | 245 | #course-info 246 | margin: 10px auto 247 | text-align: left 248 | 249 | th 250 | font-weight: bold 251 | min-width: 170px 252 | vertical-align: top 253 | 254 | {font-medium} 255 | color: accent 256 | text-transform: uppercase 257 | 258 | opacity: 0.6 259 | 260 | tr:last-of-type 261 | line-height: 1 262 | 263 | .email::before 264 | {icon-envelope} 265 | margin-left: 5px 266 | 267 | #this-week 268 | margin: 30px auto 0 auto 269 | 270 | width: 1220px 271 | @media screen and (max-width: 1340px) 272 | width: 670px 273 | 274 | text-align: left 275 | 276 | li, p 277 | line-height: 1.1 278 | 279 | li 280 | margin-bottom: 10px 281 | 282 | > h1 283 | {font-large} 284 | opacity: 0.6 285 | 286 | .week-summary 287 | display: flex 288 | flex-wrap: wrap 289 | justify-content: center 290 | 291 | padding: 25px 292 | border: 2px solid accent 293 | border-radius: 8px 294 | 295 | {font-small} 296 | 297 | background-color: white 298 | box-shadow: 0 0 5px rgba(0,0,0,0.12) 299 | 300 | h1 301 | font-weight: bold 302 | text-transform: uppercase 303 | padding-bottom: 10px 304 | 305 | ul 306 | list-style-type: none 307 | 308 | section 309 | width: 250px 310 | margin: 5px 20px 311 | 312 | vertical-align: top 313 | 314 | &.assignment 315 | > p 316 | margin-top: 0 317 | 318 | .files 319 | display: flex 320 | justify-content: space-between 321 | flex-wrap: wrap 322 | 323 | &.slides-and-notes 324 | ul:empty::after 325 | content: "(None yet)" 326 | 327 | #about 328 | .module 329 | margin-bottom: 30px 330 | 331 | ul 332 | margin-left: 20px 333 | 334 | #textbooks 335 | img 336 | height: 200px 337 | margin: 0 10px 10px 0 338 | 339 | dd 340 | margin-bottom: 10px 341 | 342 | cite 343 | font-weight: bold 344 | 345 | #references 346 | ul 347 | margin-top: 10px 348 | 349 | #lectures 350 | > .abbreviations 351 | margin-bottom: 20px 352 | list-style-type: none 353 | 354 | #lectures > section 355 | display: table 356 | width: 100% 357 | margin-bottom: 20px 358 | {font-smallest} 359 | 360 | .label 361 | width: 20% 362 | .references 363 | width: 25% 364 | .slides 365 | width: 20% 366 | 367 | li 368 | line-height: normal 369 | margin-bottom: 10px 370 | 371 | h1 372 | margin-bottom: 15px 373 | 374 | .date, .video 375 | display: block 376 | margin-top: 5px 377 | 378 | .date 379 | color: accent 380 | font-size: 0.9em 381 | opacity: 0.6 382 | 383 | .video 384 | font-size: 0.85em 385 | 386 | &::after 387 | font-family: "Glyphicons Halflings" 388 | margin-left: 5px 389 | vertical-align: top 390 | {icon-video} 391 | 392 | ul 393 | list-style-type: none 394 | 395 | .topics, .references 396 | padding-right: 60px 397 | 398 | .references > ul:empty::after 399 | content: "(None)" 400 | 401 | .icon 402 | &.references, &.slides 403 | &::before 404 | position: absolute 405 | left: -42px 406 | top: 20px 407 | 408 | font-size: 30px 409 | 410 | &.references::before 411 | {icon-book} 412 | 413 | &.slides::before 414 | {icon-pencil} 415 | 416 | &.video::before 417 | {icon-video} 418 | 419 | > section 420 | display: table-row 421 | 422 | &:first-of-type > div 423 | padding-top: 0 424 | 425 | &.icon::before 426 | top: 0 427 | 428 | > div 429 | position: relative 430 | 431 | display: table-cell 432 | padding-right: 20px 433 | padding-top: 20px 434 | 435 | vertical-align: top 436 | 437 | &:first-of-type 438 | padding-left: 20px 439 | 440 | > h1 441 | margin-bottom: 10px 442 | 443 | #assignments 444 | .policies 445 | margin-bottom: 30px 446 | 447 | .homework 448 | margin-bottom: 20px 449 | 450 | strong 451 | text-transform: uppercase 452 | display: block 453 | 454 | .module 455 | display: inline-block 456 | vertical-align: middle 457 | max-width: 600px 458 | width: 100% 459 | 460 | > * 461 | display: table-cell 462 | padding-right: 40px 463 | 464 | &:last-of-type 465 | padding-right: 0 466 | 467 | .title 468 | width: 250px 469 | 470 | > h1 471 | line-height: 1.6em 472 | white-space: nowrap 473 | 474 | > p 475 | margin-top: 0 476 | 477 | .deadline 478 | width: 250px 479 | 480 | .files 481 | width: 100px 482 | 483 | .submit, .solutions 484 | display: inline-block 485 | vertical-align: middle 486 | margin-top: 5px 487 | margin-left: 30px 488 | 489 | .submit 490 | text-align: center 491 | 492 | .icon 493 | margin-bottom: 5px 494 | 495 | &::before 496 | {icon-envelope} 497 | font-size: 32px 498 | margin-right: 0 499 | 500 | a:hover 501 | color: accent 502 | 503 | .icon::before 504 | opacity: 1 505 | 506 | #people 507 | > section:not(:last-of-type) 508 | margin-bottom: 50px 509 | 510 | > section.multiple-people 511 | margin-bottom: 30px 512 | max-width: 1300px 513 | 514 | ul 515 | display: flex 516 | flex-flow: row wrap 517 | list-style-type: none 518 | 519 | .person 520 | display: flex 521 | 522 | margin-right: 20px 523 | margin-bottom: 20px 524 | 525 | flex-grow: 0 526 | flex-shrink: 0 527 | flex-basis: 600px 528 | width: 600px 529 | 530 | img-size = 150px 531 | 532 | min-height: img-size + 2 * module-padding 533 | 534 | > img 535 | width: img-size 536 | height: img-size 537 | margin-right: 20px 538 | border-radius: 8px 539 | 540 | flex: 0 0 auto 541 | 542 | > .info 543 | min-width: 0 // bizarre flexbox behavior; https://bugs.webkit.org/show_bug.cgi?id=94584#c2 544 | > p 545 | margin: 0 5px 546 | 547 | &.name 548 | font-weight: bold 549 | 550 | &.email 551 | overflow: hidden 552 | text-overflow: ellipsis 553 | 554 | &.bio 555 | margin-top: 10px 556 | 557 | {font-smallest} 558 | -------------------------------------------------------------------------------- /styles/tablet-and-phone.styl: -------------------------------------------------------------------------------- 1 | body > section 2 | padding-bottom: 50px 3 | 4 | > h1 5 | margin-bottom: 30px 6 | 7 | body > nav > a:hover 8 | width: auto 9 | 10 | #lectures > section 11 | .label, .references, .slides 12 | width: auto 13 | 14 | #assignments 15 | .solutions, .submit 16 | margin-top: 10px 17 | 18 | strong 19 | display: inline-block 20 | margin-right: 5px 21 | 22 | .submit 23 | text-align: left 24 | .icon 25 | display: inline-block 26 | &::before 27 | font-size: 16px 28 | 29 | #this-week 30 | width: 600px 31 | 32 | section 33 | width: 220px 34 | 35 | -------------------------------------------------------------------------------- /templates/_assignment-details.hbs: -------------------------------------------------------------------------------- 1 |

    Due: {{date Due}}, {{@root.assignmentsFrontmatter.[Due time]}}

    2 |
    3 | {{#each PDF}} 4 | {{@key}} 5 | {{/each}} 6 | {{#each ZIP}} 7 | {{@key}} 8 | {{/each}} 9 |
    10 | -------------------------------------------------------------------------------- /templates/_references.hbs: -------------------------------------------------------------------------------- 1 | {{!-- Squashing the Handlebars against the is important so that :empty works --}} 2 | 6 | -------------------------------------------------------------------------------- /templates/assignments.hbs: -------------------------------------------------------------------------------- 1 | {{#each this}} 2 |
    3 |
    4 |
    5 |

    {{Label}}

    6 |

    {{{Description}}}

    7 |
    8 | {{> _assignment-details }} 9 |
    10 | {{#if Submittable}} 11 | 17 | {{/if}} 18 | {{#each Solutions}} 19 |
    20 | Solutions: 21 | {{@key}} 22 |
    23 | {{/each}} 24 |
    25 | {{/each}} 26 | -------------------------------------------------------------------------------- /templates/lectures.hbs: -------------------------------------------------------------------------------- 1 | {{#each this}} 2 |
    3 |

    {{Title}}

    4 | 5 | {{#each Events}} 6 |
    7 |
    8 |

    9 | {{Label}} 10 | {{shortDate @key}} 11 | {{#if Video}} 12 | Video 13 | {{/if}} 14 |

    15 |
    16 |
    17 |
      18 | {{#each Topics}} 19 |
    • {{@key}}
    • 20 | {{/each}} 21 |
    22 |
    23 |
    24 |

    References

    25 | 26 | {{> _references }} 27 |
    28 |
    29 |

    Slides and Notes

    30 |
      {{#each [Slides and Notes]}}
    • {{maybeLink this}}
    • {{/each}}
    31 |
    32 |
    33 | {{/each}} 34 |
    35 | {{/each}} 36 | -------------------------------------------------------------------------------- /templates/this-week.hbs: -------------------------------------------------------------------------------- 1 |
    2 |

    This week

    3 | 4 |
    5 | {{#with lecture}} 6 |
    7 |

    Topics

    8 |
      9 | {{#each Events}} 10 | {{#each Topics}} 11 |
    • {{@key}}
    • 12 | {{/each}} 13 | {{/each}} 14 |
    15 |
    16 |
    17 |

    References

    18 | 19 | {{#each Events}}{{> _references }}{{/each}} 20 |
    21 | {{/with}} 22 | {{#with lecture}} 23 |
    24 |

    Slides and Notes

    25 |
      {{#each Events}}{{#each [Slides and Notes]}}
    • {{maybeLink this}}
    • {{/each}}{{/each}}
    26 |
    27 | {{/with}} 28 | {{#with assignment }} 29 |
    30 |

    {{Label}}

    31 |

    {{{Description}}}

    32 | 33 | {{> _assignment-details }} 34 |
    35 | {{/with}} 36 |
    37 |
    38 | --------------------------------------------------------------------------------