COSC 3

Introduction to Machine Learning

A modern, AI-oriented approach.

Fall 2026

Course informationDetails
InstructorNikhil Singh
Assistant Professor of Computer Science
Director, SAHAS Lab
Co-director, Digital Arts program
Emailnikhil.u.singh@dartmouth.edu
Class meetings3A (MW 3:30–5:20 PM) @ Room TBD
X-hour or lab3AX (M 5:30–6:20). Occasional use
Office hoursTBD @ ECSC 013
Course sitecosc3.com
PrerequisitesCOSC 1 or equivalent; MATH 8 or equivalent
Final examinationTBD during registrar-scheduled period (11/20–11/24)

Course description

This course introduces machine learning by applying it to real data and tasks. It focuses on the sequence of design decisions involved in solving practical machine learning problems: how raw data are transformed into usable representations, how to select appropriate models based on the problem and other constraints, how the model’s parameters are efficiently learned from data, and how its performance is evaluated. Students will work across multiple data modalities (including audio, images, and text) using progressively more expressive models, from linear methods to neural networks, primarily through hands-on experimentation. By the end of the course, students will be able to design and justify machine learning solutions for new applied problems.

Learning outcomes

By the end of the course, students should be able to do at least the following:

  1. Explain the difference between conventional software and machine learning: specifying behavior directly versus specifying examples + applying learning procedures

  2. Translate real-world raw data objects from multiple modalities into vector, matrix, and tensor representations to computationally process them

  3. Define prediction targets, features, loss functions, baselines, model classes, and evaluation procedures for applied ML problems

  4. Estimate prediction rules from finite samples and reason at a high level about properties like bias, variance, uncertainty, and generalization

  5. Fit and evaluate regression and classification models using appropriate metrics

  6. Make predictions using common linear models, simple neural networks, and language models as predictors

  7. Identify common evaluation failures such as leakage, class imbalance, task–metric and train–test mismatches

Prerequisites

Formal prerequisites are COSC 1 or equivalent and MATH 8 or equivalent. You should enter with the following working skills:

  • Write and debug Python programs using functions, loops, conditionals, lists, dictionaries, and files

  • Read basic mathematical notation and manipulate algebraic expressions

  • Work with derivatives of simple functions

  • Interpret vectors and matrices at an introductory level

We do not expect any prior course in machine learning, statistics, probability, natural-language processing, or college-level linear algebra. We will introduce ideas from these areas along the way.

If you are considering taking the course, please work through Homework 0!

Software and computing resources

The course will use Python 3 and various packages as they become relevant:

  • numpy, pandas, and matplotlib throughout

  • scikit-learn for fitting estimators

  • JAX and/or PyTorch for automatic differentiation neural network implementations

  • The Dartmouth Chat API with langchain_dartmouth

  • Jupyter lab or another supported environment (Colab, marimo, Deepnote, etc.; your choice)

Assignments

Note: Along with each assignment, we ask you to submit an assignment memo (~1 page). This should describe any AI assistance you used, any people you consulted, and how you approached this assignment. It should also include your overall observations and learnings from working through it.

Homework 0

Brief, self-assessed diagnostic on Python basics, algebra, derivatives, and basic vectors and matrices.

Assignment 1: Data, Representations, and Simple Prediction Problems

Works through the fundamental skills of data representation, error measurement, constant prediction rules, and related topics.

Assignment 2: Conditional Prediction

Introduces the notion of making predictions using features, how to encode data into useful features, multiple regression, and classification via logistic regression.

Assignment 3: Learning with Natural Language

Discusses representations for natural language data, and how to make it amenable to making predictions. Introduces methods like n-gram models, TF-IDF, truncated singular value decomposition and latent semantic analysis, working with larger datasets, and hyperparameters.

Assignment 4: How Much Can a Machine Learn?

Two-part assignment. The first introduces more expressive models, via implementing simple neural networks. Also introduces automatic differentiation. The second part studies predicting with little to no labeled data at all using pretrained language models as zero-shot and few-shot predictors. Introduces in-context learning and calibration methods.

Assignment 5: AI Measurement

Introduces benchmarks, uncertainty quantification, and deployment-relevant considerations such as distribution shift. The goal of this assignment is to prepare students for real-world deployments of predictors which they can now use.

Assessment

ComponentWeight
Assignment 15%
Assignment 25%
Assignment 35%
Assignment 45%
Assignment 55%
In-class quizzes (lowest score is dropped)25%
Midterm25%
Final exam25%
Extra creditVarious opportunities

Since this a new class, letter-grade thresholds may be adjusted based on performance on the first assignments and quizzes (will not be curved, only calibrated). The current thresholds are:

EDC-CC+B-BB+A-A
<40%40%–
44.99%
45%–
49.99%
50%–
59.99%
60%–
69.99%
70%–
79.99%
80%–
84.99%
85%–
89.99%
90%–
95.99%
≥96%

Quizzes

There are five brief, closed-book, in-class quizzes. These will each typically take 10–15 minutes and contain a mix of mathematical, computational, and design questions. Only your best 4 scores count toward the course grade (i.e. we drop your lowest score).

Midterm exam

The midterm will be in-class, closed-book, and take approximately 60 minutes. It will mainly emphasize material from Assignments 1 and 2, i.e. basic prediction rules, metrics, and methods. We will give you a concise reference sheet containing formulae that will help reduce the need to memorize things. The questions will combine computation by hand, interpretation of results, mathematical reasoning, and critique of given designs. No programming except some high-level pseudo-code.

Final exam

The final is cumulative and does not require coding. You will receive unfamiliar applied problems and must construct a coherent machine-learning design to solve the problem and explain your reasoning. You will also be given existing designs and asked to find flaws with them and propose solutions. The goal is to test your readiness to solve real applied problems.

Schedule

Note: this is tentative and subject to change.

WeekDatesTopicsAssignments and assessments
1Sep. 14 & 16History and “why” of machine learning
Intro to prediction problems
Python computations → NumPy and pandas
Vectors, matrices, tensors
Losses and constant baselines
Train-test separation
Mean, median, MAE, MSE
⏱️Homework 0 due
📝Assignment 1 out
2Sep. 21 & 23Variance and covariance
Audio and image representations
Random search and hill climbing
⌛Quiz 1
3Sep. 28 & 30Conditional prediction
Prediction time and leakage
One-feature and multi-feature linear regression
OLS
Categorical encoding
Prediction pipelines
⏱️Assignment 1 due
📝Assignment 2 out
4Oct. 5 & 7Feature engineering from high-dimensional raw data
Logistic regression
Probabilities and decision thresholds
Confusion matrices
Held-out evaluation
Multiclass prediction
⌛Quiz 2
5Oct. 12 & 14Tokenization
Unigram and bigram models
Document-term matrices
TF-IDF
Class imbalance and macro F1
⏱️Assignment 2 due
📝Assignment 3 out
⌛Quiz 3 (midterm prep)
6Oct. 19 & 21SVD and LSA
Pretrained embeddings
Hyperparameters
Comparing representations
Validation and test discipline
⌛Midterm
7Oct. 26 & 28Nonlinearity
Multilayer perceptrons
Forward and backward passes w/ backpropagation
Cross-entropy
SGD
Automatic differentiation
⏱️Assignment 3 due
📝Assignment 4 out
⌛Quiz 4
8Nov. 2 & 4Model capacity and parameter counts
Bias and variance
Learning curves
Zero-shot and in-context prediction
⏱️Assignment 4 due
📝Assignment 5 out
9Nov. 9 & 11Calibration and selective prediction
Paired comparisons and bootstrap uncertainty
Benchmark populations
Holdout reuse, benchmarking platforms
⌛Quiz 5 (final prep)
10Nov. 16Distribution shift
Limits of automatic evaluation
Robustness
Metrics beyond model performance
⏱️Assignment 5 due
📚Review for final exam

Changes to any of these will be announced with as much notice as circumstances permit.

Work submission and extensions

Assignments are to be submitted through Gradescope by the posted time. Each student gets a bank of five 24-hour lateness freebies for the term (automatically applied with no explanation needed). They cannot be used for quizzes, the midterm, or the final. We drop the lowest quiz to give you flexibility.

Any late work outside of this will receive at most 50% credit.

Regrade requests

Any regrade requests must be submitted within 7 calendar days after the relevant grade is released. Please be clear about why this is needed. Note that the staff may re-examine the entire question when resolving a regrade request, so the score may remain the same, increase, or decrease.

Collaboration

You should absolutely discuss and collaborate with others at the level of concepts, mathematical reasoning, debugging strategies, interpretation of assignment instructions, etc. Collaboration is of course a tremendous learning resource. You must, however, write and submit your own code, calculations, figures, and prose for all assignments.

Use of AI tools

tl;dr: be responsible. If you over-rely on AI assistance for assignments, you will struggle with the exams and quizzes. A huge amount of work went into making these assignments helpful to you.

Let’s do the math.

Suppose you use AI to easily complete all assignments, minimizing your exposure to their challenges. Then, your performance on quizzes and exams can be modeled using two variables. Let r[0,1]r \in [0, 1] be the fraction of quiz/exam knowledge you acquire from working through assignments, and p[0,1]p \in [0, 1] be your (latent) prior knowledge + whatever you learn from lecture, readings, etc. w=0.25w = 0.25 is the fraction of your grade coming from assignments.

Your final grade is then approximately:

G=w+(1w)[p+(1p)r]G = w+(1-w)[p+(1-p)r]

For example, suppose your prior + lecture-derived mastery is excellent at p=0.5p = 0.5, and doing assignments properly would raise rr to 80% but heavy AI use means you retain relatively little from assignments (say r=15%r = 15\%). Then, the former gets you 92.5% (A-) and the latter gets you 68.1% (C+). Big difference!

So, make the choice you think is smartest.

Ask the course staff to model or audit responsible use for you when in doubt.

You are permitted to use AI assistants on programming assignments as learning, explanation, and debugging tools. They are of course not permitted on quizzes and exams. Note the following caveats:

  1. Your submitted work must reflect your own understanding. You are responsible for being able to explain every line of code or math, every figure, etc.

  2. You may be asked to do so on demand in class or in office hours.

  3. Any assignment-specific instructions (noted in the notebook) take precedence over these points

  4. I encourage you to review the evidence on AI-assisted learning currently available, e.g. Bastani et al. 2025, Poulidis et al. 2025

  5. Some of the methods we will learn are newer and may not yet be well-represented in the data modern language models are trained on

Along with each assignment, we ask you to submit an assignment memo (~1 page). This should describe any AI assistance you used, any people you consulted, and how you approached this assignment. It should also include your overall observations and learnings from working through it.

Note: this memo must be written by you without any AI assistance. We will not evaluate your spelling, grammar, etc. An assignment will not be considered complete unless this memo has been turned in.

Expectations & Class Norms

Attendance and timeliness
You must attend at least 80% of class meetings. If your attendance falls below this threshold, your final grade will be affected. Please arrive on time and stay for the full class period. This also means being meaningfully present. Our class sessions will involve discussion, collaborative problem solving, exercises, etc.

On the occasion that you do need to miss class, you do not need to let me know. You are responsible for finding out what you missed and catching up. If a special circumstance will cause an extended pattern of absences, please contact me so that we can figure out a plan.

Technology use in the classroom
Help me help you. A tremendous amount of effort goes into every class session, and our time together is very limited given the complexity of the topic we are trying to dive into. Please bring your deepest focus to it.

I ask that you just put your laptops, tablets, and phones away by default. I assure you that, under ordinary conditions, you won’t need them. Though I used to be more flexible about this, I have observed a pattern of disengagement that arises from it and this comports with emerging evidence, albeit it is not directly comparable (see e.g. Sungu et al. 2025, Carter et al. 2016). For sessions where they are needed for specific in-class tasks, I will cue you to bring them out.

Discussion platform
We will use the Ed Discussion platform to manage questions and dialog about all class materials and related topics. You are encouraged to participate actively here, in both asking and addressing questions (keeping in mind the same collaboration bounds we discussed earlier).

Academic Honor Principle

Students are expected to adhere to Dartmouth's Academic Honor Principle. For more information, please review the Academic Honor Policy for Undergraduate Students in Arts and Sciences.

Student accessibility and accommodations

Students requesting disability-related accommodations and services for this course are required to register with Student Accessibility Services (SAS; Apply for Services webpage; student.accessibility.services@dartmouth.edu; 1-603-646-9900) and to request that an accommodation email be sent to me in advance of the need for an accommodation. Then, students should schedule a follow-up meeting with me to determine relevant details such as what role SAS or its Testing Center may play in accommodation implementation. This process works best for everyone when completed as early in the quarter as possible. If students have questions about whether they are eligible for accommodations or have concerns about the implementation of their accommodations, they should contact the SAS office. All inquiries and discussions will remain confidential.

Religious observances

Dartmouth has a deep commitment to support students' religious observances and diverse faith practices. Some students may wish to take part in religious observances that occur during this academic term. If you have a religious observance that conflicts with your participation in the course, please meet with me as soon as possible—before the end of the second week of the term at the latest—to discuss appropriate course adjustments.

Mental Health and Wellness

The academic environment is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including: the Counseling Center which allows you to book triage appointments online, the Student Wellness Center which offers wellness check-ins, and your undergraduate dean. The student-led Dartmouth Student Mental Health Union and their peer support program may be helpful if you would like to speak to a trained fellow student support listener. If you need immediate assistance, please contact the counselor on-call at (603) 646-9442 at any time. Please make me aware of anything that will hinder your success in this course.

Title IX

At Dartmouth, we value integrity, responsibility, and respect for the rights and interests of others, all central to our Principles of Community. We are dedicated to establishing and maintaining a safe and inclusive campus where all community members have equal access to Dartmouth's educational and employment opportunities. We strive to promote an environment of sexual respect, safety, and well-being. Through the Sexual and Gender-Based Misconduct Policy (SMP), Dartmouth demonstrates that sex and gender-based discrimination, sex and gender-based harassment, sexual assault, dating violence, domestic violence, stalking, etc., are not tolerated in our community.

For more information regarding Title IX and to access helpful resources, visit Title IX's website (sexual-respect.dartmouth.edu). As a faculty member, I am required to share disclosures of sexual or gender-based misconduct with the Title IX office.

If you have any questions or want to explore support and assistance, please contact the Title IX office at 603-646-0922 or TitleIX@dartmouth.edu. Speaking to Title IX does not automatically initiate a college resolution. Instead, much of their work is around providing supportive measures to ensure you can continue to engage in Dartmouth's programs and activities.

Recording of course materials

(1) Consent to recording of course meetings and office hours that are open to multiple students.

By enrolling in this course,

a) I affirm my understanding that the instructor may record meetings of this course and any associated meetings open to multiple students and the instructor, including but not limited to scheduled and ad hoc office hours and other consultations, within any digital platform, including those used to offer remote instruction for this course.

b) I further affirm that the instructor owns the copyright to their instructional materials, of which these recordings constitute a part, and my distribution of any of these recordings in whole or in part to any person or entity other than other members of the class without prior written consent of the instructor may be subject to discipline by Dartmouth up to and including separation from Dartmouth.

(2) Requirement of consent to one-on-one recordings

By enrolling in this course, I hereby affirm that I will not make a recording in any medium of any one-on-one meeting with the instructor or another member of the class or group of members of the class without obtaining the prior written consent of all those participating, and I understand that if I violate this prohibition, I will be subject to discipline by Dartmouth up to and including separation from Dartmouth, as well as any other civil or criminal penalties under applicable law. I understand that an exception to this consent applies to accommodations approved by SAS for a student’s disability, and that one or more students in a class may record class lectures, discussions, lab sessions, and review sessions and take pictures of essential information, and/or be provided class notes for personal study use only.

If you have questions, please contact the Office of the Dean of the Faculty of Arts and Sciences.

Changes to this syllabus

This syllabus is current as of August 2026. Any change that affects graded work will be announced through the course site and recorded in an updated schedule.

This is the current course syllabus. Open the published syllabus