Week 1

Course Overview and Structure

  • Course aims: establish foundations in classical machine learning (non-neural network methods) and prepare for later deep learning topics (GANs, reinforcement learning, transformers).

  • Initial focus (roughly first 7–8 lectures): classical AI/ML techniques (e.g., SVMs, regression, decision trees, ensembles, dimensionality reduction).

  • Latter part (roughly last 5 lectures): introduction to deep learning concepts plus GANs, reinforcement learning, and transformers.

  • Deep learning and NLP have a separate, more extensive course next semester; this course provides an introductory treatment to DL topics but not full depth.

  • Emphasis across the course: math foundations, especially matrix manipulations and linear algebra; real-world applicability and practical understanding.

  • Overall goal: students become proficient with classical AI/ML techniques and gain familiarity with reinforcement learning and GANs, with exposure to DL topics.

Instructor, Office Hours, and Communication

  • Instructor: background includes a BS in computer engineering and an MBA from Wharton; has a past affiliation with GWU.

  • Contact: email provided; subject line should include 8505 to help prioritization; typical response window is 24–48 hours.

  • Office hours adjustment: Wednesdays and Fridays from 6:00 PM Eastern to 7:30 PM Eastern.

  • Office hours format: Zoom link provided in syllabus Blackboard folder; open to drop-in questions.

  • Syllabus access: slides, recordings, and course resources available via Blackboard; plan to use Blackboard folders for organization.

  • Course responsibilities: attendance is mandatory for live sessions; if traveling, request recording in advance.

Course Delivery Tools and Guidance

  • Python is essential; course uses Colab for coding and execution to simplify environment setup.

  • Colab pros: free online Python execution with optional GPU support for practice, relatively easy access to hardware.

  • Other tools in the ecosystem: Copilot, VS Code, Gemini, etc. These can assist coding but are not a substitute for learning the language and libraries; students should still develop core Python and ML literacy.

  • Do not over-rely on GenAI tools for actual assignments or exams; these tools can assist but should not replace understanding and coding ability.

  • For exams and praxis, tools are restricted; your understanding and hand-on capability are essential.

Textbooks, Readings, and Course Materials

  • Textbooks are treated as reference materials and are not the sole authority; students are responsible for what is covered in class and on assignments.

  • Instructors provide reading guidelines and recommended chapters; students may be advised to read ahead if desired.

  • Books and external resources may be suggested (e.g., StatQuest videos by Josh Starmer for concepts like trees).

  • The course will supply notebooks/notebooks in Colab for assignments; students will execute these notebooks to complete assignments.

  • Textbook pages/chapters: course may reference specific chapters/pages; students should use provided guidelines and instructor references.

Course Topics and Schedule (High-Level)

  • Lecture 1: Intro to machine learning and course expectations; what is ML; overview of the ML lifecycle.

  • Lecture 2: Decision trees and tree-based methods; basic model training concepts.

  • Lecture 3: Support Vector Machines (SVMs) and related ensemble approaches.

  • Lecture 4: Ensembles and related techniques (e.g., random forests, boosting).

  • Lecture 5: Dimensionality Reduction techniques (e.g., PCA, t-SNE concepts);

  • Lecture 6: Introduction to neural networks and deep learning foundations (not deep dive here).

  • Lecture 7–Lecture 9: Deep learning topics (LSTMs, RNNs, autoencoders) as preliminary groundwork; attention mechanisms and transformers introduced.

  • Lectures on GANs and reinforcement learning (RL) planned for later sessions.

  • Final lecture: survey of latest topics in AI.

  • Exams: midterm and final, both in-class, with a dedicated exam session in the same course room.

Assessments and Coursework

  • Homework: 30% of the course grade; emphasizes consistent, high-quality work, similar weight to midterm/final.

  • Assignments: hands-on Python notebooks delivered via Google Colab; you will run notebooks and answer multiple-choice questions based on the outputs.

  • Homework/assignment timing: open at 4:00 PM Eastern on a given day; due by 9:00 AM the following Saturday (one-week window).

  • Practice materials: a practice test in Blackboard to verify camera and environment readiness before the midterm; this is to avoid technical issues during the actual exam.

  • Midterm and final formats: multiple-choice questions; two-hour windows; cheat sheet allowed (one sheet of notes) for reference during the exam.

  • Exams policy: no use of external tools or AI assistance during actual exams; the emphasis is on understanding and application of material learned in class.

  • Practice and preparation guidance: study lecture notes, assignment concepts (e.g., confusion matrix), and fundamental ML concepts; ensure you understand core ideas behind methods.

Exam and Cheat Sheet Details

  • Cheat sheet: one page allowed; you may note down formulas and key concepts for quick reference during the exam.

  • Exam preparation: focus on understanding topics covered in class and in assignments; memorize core definitions and be able to apply them to problems (e.g., confusion matrix, precision, recall).

  • Exams are designed to test understanding of key concepts and the ability to apply them, rather than memorization alone.

Core Concepts: What Is ML, AI, DL, DS, and Data Engineering?

  • AI (Artificial Intelligence): the broad umbrella; any technique that mimics human-like decision making or intelligence.

  • ML (Machine Learning): a subset of AI where algorithms learn patterns from data rather than being explicitly programmed with rules.

  • DL (Deep Learning): a subset of ML that uses neural networks with many layers to learn representations; inputs can be learned automatically rather than hand-specified features.

  • Data Science: broader field focused on extracting actionable insights from data; includes data preparation, analysis, and interpretation; overlaps with ML and statistics.

  • Data Engineering: the discipline of building data pipelines, ensuring data quality, availability, and scalability for analysis and ML.

  • Practical takeaway: AI/ML/DL are related, but each has distinct roles; in practice, data quality and quantity often determine which approach is feasible.

Why We Need Machine Learning (Intuition and Definitions)

  • ML is driven by data; with experience, performance improves as algorithms learn from data.

  • In traditional programming, humans specify rules; in ML, the algorithm learns the mapping from inputs to outputs from labeled data (supervised) or discovers structure in unlabeled data (unsupervised).

  • Deep learning (a subfield of ML) can learn input representations automatically and requires large amounts of data; classical ML methods often require feature engineering and explicit input definitions.

  • Real-world relevance: ML enables pattern recognition at scale (e.g., language translation, face recognition, autonomous driving, real-time decision making).

  • Core distinction: ML relies on data-driven learning, whereas traditional programming relies on hand-crafted rules. Data availability is a critical factor in choosing an approach.

Data Quality, Preprocessing, and the ML Pipeline

  • Data quality is essential: “garbage in, garbage out”; data cleansing and cleaning are prerequisites to modeling.

  • Data representativeness: the training data should reflect the domain and the problems you aim to solve; choose samples that minimize bias and ensure coverage of relevant scenarios.

  • Data partitioning: split data into training (and/or learning) and testing sets; a separate validation set is often used to tune hyperparameters (the validation set acts as a preview for hyperparameter tuning).

  • Random splits: libraries typically randomize the train/test split; ensure the test set remains unseen during training.

  • Data processing steps: feature engineering, discretization of continuous variables, one-hot encoding, transformations (log transforms, etc.), and feature scaling/normalization to keep input scales comparable.

  • Feature scaling: standardization (z-score) and normalization; example standardization formula: z = rac{x - bc}{c} where bc is the mean and c is the standard deviation.

  • Data representation example: MNIST dataset for digit recognition; 28×28 pixel images; classic hello-world for image classification; dataset characteristics: extMNISTtrain=60,000,extMNISTtest=10,000ext{MNIST train} = 60{,}000, ext{MNIST test} = 10{,}000

  • Feature engineering vs end-to-end learning: classical ML often requires explicit features; deep learning can learn features automatically given enough data.

  • Data leakage warning: never reveal the test set to the model during training; preserve a separate test set to evaluate generalization.

Model Evaluation and Metrics

  • Confusion matrix (for multi-class or binary): rows = true labels, columns = predicted labels; a diagonal-dominant matrix indicates good performance. Good classifiers have most values on the diagonal.

  • Primary metrics:

    • Accuracy: extAccuracy=TP+TNTP+FP+FN+TNext{Accuracy} = \frac{TP + TN}{TP + FP + FN + TN}

    • Precision: extPrecision=TPTP+FPext{Precision} = \frac{TP}{TP + FP}

    • Recall (True Positive Rate): extRecall=TPTP+FNext{Recall} = \frac{TP}{TP + FN}

    • F1 score: F1=2PrecisionRecallPrecision+RecallF1 = 2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}

  • Additional metrics and concepts:

    • False positives (FP) and false negatives (FN); Type I error (FP) and Type II error (FN).

    • Precision-Recall tradeoffs: precision favors fewer false positives; recall favors capturing more positives.

    • ROC curve: plot True Positive Rate (TPR, recall) vs. False Positive Rate (FPR); Area Under the Curve (AUC) used to compare classifiers.

    • A perfect classifier would have ROC AUC = 1.0; a random classifier has ROC AUC ≈ 0.5.

  • Preference for metrics: rely on multiple metrics (not only accuracy) because accuracy can be misleading in imbalanced datasets (e.g., MNIST with rare digits).

  • Practical use of ROC and AUC: helpful for comparing models and hyperparameter settings across different thresholds.

Learning Types and Training Paradigms

  • Supervised learning: labeled data; goal is to map inputs to known outputs (e.g., classification, regression).

  • Unsupervised learning: no labels; tasks include clustering and dimensionality reduction.

  • Semi-supervised learning: a mix of labeled and unlabeled data; can leverage unlabeled data to improve learning.

  • Reinforcement learning (RL): agents learn by interacting with an environment, receiving rewards/penalties; used in AlphaGo-like settings.

  • Instance-based vs. model-based approaches:

    • Instance-based: memorize instances and compare new cases to labeled examples (e.g., k-NN).

    • Model-based: learn a parametric model (e.g., neural networks, SVM) and apply it to new data.

  • Hyperparameters: knobs not learned from data (e.g., learning rate, regularization strengths, kernel parameters); tuned via a validation set or search methods.

    • Common tuning methods: grid search, random search, Bayesian optimization.

  • Overfitting vs. underfitting:

    • Overfitting: model learns noise in training data; poor generalization to new data.

    • Underfitting: model too simple to capture underlying patterns.

    • Remedies: regularization, early stopping, dropout (in DL), proper model complexity, data augmentation, and using validation performance to guide training.

  • Data split and validation:

    • Training data (learning data) used to fit the model; validation data used to tune hyperparameters and monitor overfitting.

    • Test data kept separate for final evaluation.

  • Data pipeline and project lifecycle:

    • Data collection, feature extraction/engineering, feature scaling.

    • Model training, evaluation, and potential iterative refinement.

    • After deployment, monitor model performance (model drift) and retrain as needed.

  • Business focus: the ML life cycle is driven by the business problem and the desired performance metric; data quality and availability strongly influence feasibility.

Transformers, Attention, and Deep Learning (High-Level Preview)

  • Transformers and attention mechanisms enable parallelizable computations and strong performance in NLP tasks; attention is effectively a matrix operation to measure correlations between tokens.

  • Transformers originated from the paper “Attention Is All You Need” (2017); they became foundational for many NLP and vision tasks due to parallel computation and scalable representations.

  • In practice, transformer architectures involve multiple layers and attention heads; design choices (e.g., depth, heads) are often empirical.

  • Transformers have extended beyond NLP to images and other domains due to their flexible representation learning capabilities.

  • Important caveat: DL models require substantial data and compute; classical ML methods may be preferable with limited data.

Practical Computing and Environment Choices

  • Colab as a learning tool: convenient cloud-based notebook environment with optional GPU access; suitable for most assignments.

  • Local environments: VS Code, Jupyter, or other IDEs are viable; choice depends on comfort, hardware, and project needs.

  • Cloud compute and GPUs: available on demand from AWS, Azure, Google Cloud; powerful but potentially expensive; prudent usage is advised.

  • Homework notebooks are designed to run on Colab; if you run them locally, you may need to adapt environment settings and library versions.

Break and Framing the Technology Landscape

  • Break time: 15 minutes (mid-lecture) to reflect and reset.

  • Gartner hype cycle framing: technologies progress through stages (Innovation Trigger, Peak of Inflated Expectations, Trough of Disillusionment, Slope of Enlightenment, Plateau of Productivity).

  • Current stance in class: agentic AI and related topics are discussed within the hype cycle context; expectation management around real-world maturity and ROI.

  • Real-world frames: AI/ML are embedded in daily life (language translation, image recognition, mobile assistants); the course emphasizes understanding the math behind these systems.

Practical Guidance for Students

  • Data matters: with no data, ML cannot be applied; ensure you have representative, cleansed data for your domain.

  • Data splits: use random splits; ensure training/validation/test represent the problem you want to solve; test data should be kept unseen until evaluation.

  • Data governance: ensure you preserve a test set that truly reflects the problem domain and avoid leakage.

  • Model evaluation discipline: rely on multiple metrics (e.g., accuracy, precision, recall, F1, ROC-AUC) to assess model performance; avoid overreliance on a single score.

  • Ethical and practical considerations: beware biases, data quality issues, model drift, and deployment monitoring; responsible ML practice is stressed.

Real-World Examples and Applications Mentioned

  • Language translation and image recognition as common AI/ML applications (e.g., face recognition, object recognition in images).

  • GPS/phone-based photo storytelling and memory aggregation on mobile platforms as everyday examples of AI capabilities.

  • The role of GPUs in accelerating matrix multiplications, enabling large-scale neural computations; NVIDIA’s GPU focus is highlighted as enabling DL workloads.

Study and Collaboration Guidance

  • Build a habit of using office hours, emails, and Blackboard to stay aligned with course expectations.

  • Form study groups within the cohort; peer support is encouraged.

  • Practice tests and practice environments are valuable for confirming readiness before exams.

  • Start gathering domain data early if you intend to apply ML to a real problem; plan data collection and quality checks in advance.

Quick Reference: Key Formulas and Concepts (LaTeX)

  • Accuracy: extAccuracy=racTP+TNTP+FP+FN+TNext{Accuracy} = rac{TP + TN}{TP + FP + FN + TN}

  • Precision: extPrecision=racTPTP+FPext{Precision} = rac{TP}{TP + FP}

  • Recall: extRecall=racTPTP+FNext{Recall} = rac{TP}{TP + FN}

  • F1 Score: F1=2PrecisionRecallPrecision+RecallF1 = 2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}

  • Standardization: z=xμσz = \frac{x - \mu}{\sigma}

  • MNIST dataset size (example): MNIST train=60,000,MNIST test=10,000\text{MNIST train} = 60{,}000, \quad \text{MNIST test} = 10{,}000

  • ROC curve concept: plot of True Positive Rate vs False Positive Rate; AUC measures area under the curve; higher is better.

  • Hyperparameters examples: learning rate η\eta, regularization strength λ\lambda; hyperparameters are set by the user (not learned by the model).

Summary Takeaways

  • The course blends classical ML with introduction to DL concepts; math foundation in linear algebra underpins most techniques.

  • Python and Colab are central tools for practice; learners should still understand the underlying methods beyond auto-generated code.

  • Data quality and problem framing drive ML success more than any single algorithm.

  • Exams emphasize understanding, with a one-page cheat sheet allowed; practice and familiarity with the material are key to success.

  • The session emphasizes responsible, data-driven AI practice, awareness of tool limitations, and a collaborative, question-friendly learning environment.

Next Steps for Students

  • Confirm access to Blackboard, syllabus, and Zoom links for office hours.

  • Prepare a plan for data collection and cleaning for your intended projects.

  • Try the quick Colab notebook exercises once assignments are released at 4 PM; complete and understand outputs to prepare for MC questions.

  • Attend office hours to clarify any syllabus or logistics questions and join study groups with peers for mutual learning.