8000
Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” MSDS 411: Unsupervised Learning Methods

Course Type Language Status

Master of Science in Data Science β€” Unsupervised Learning Methods

A project-based course exploring traditional and modern unsupervised learning techniques for dimensionality reduction, clustering, anomaly detection, and multivariate data visualization.


πŸ“Œ Course Overview

This course introduces a broad range of unsupervised learning methods applied to real-world datasets through extensive programming assignments and projects. Unlike supervised learning, unsupervised methods uncover hidden structure in data without labeled responses β€” making them essential tools for exploratory analysis, pattern recognition, and anomaly detection.


🧠 Topics Covered

πŸ“ Dimensionality Reduction

  • Principal Component Analysis (PCA) β€” Represent relationships among many continuous variables by reducing to orthogonal components
  • Factor Analysis β€” Model latent structure underlying observed variables

πŸ‘₯ Clustering

  • Cluster Analysis β€” Identify natural groupings of individuals within data
  • Block Clustering β€” Simultaneously cluster rows and columns (biclustering) to identify groups of variables

πŸ“Š Categorical Variable Analysis

  • Log-Linear Models β€” Explore relationships and dependencies among categorical variables
  • Association Rules β€” Mine frequent patterns and co-occurrence rules (e.g., Apriori, FP-Growth)

🎨 Multivariate Visualization

  • Lattice Displays β€” Visualize conditional relationships across multiple variables
  • Multidimensional Scaling (MDS) β€” Embed high-dimensional data into lower-dimensional space preserving distances
  • t-SNE β€” t-Distributed Stochastic Neighbor Embedding for non-linear dimensionality reduction and visualization

🚨 Anomaly Detection

  • Autoencoders β€” Detect anomalies by measuring reconstruction error from neural network encoders
  • Probabilistic Deep Learning β€” Model uncertainty and detect outliers using probabilistic approaches

πŸ—‚οΈ Repository Structure

πŸ“¦ msds411-unsupervised-learning/
β”œβ”€β”€ πŸ“ assignments/
β”‚   β”œβ”€β”€ assignment_01_pca_political/
β”‚   β”œβ”€β”€ assignment_02_clustering_housing/
β”‚   β”œβ”€β”€ assignment_03_unsupervised_pretraining_credit/
β”‚   └── assignment_04_anomaly_detection_fraud/
β”œβ”€β”€ πŸ“ data/
β”‚   β”œβ”€β”€ raw/
β”œβ”€β”€ requirements.txt
└── README.md

πŸ› οΈ Tech Stack

Category Tools
Language R 4.3+
Core Libraries tidyverse, data.table, matrixStats
Machine Learning caret, tidymodels, cluster, factoextra
Association Rules arules, arulesViz
Deep Learning keras, tensorflow
Visualization ggplot2, lattice, plotly, ggfortify
Dimensionality Reduction stats, Rtsne, umap, factoextra
Notebooks R Markdown, Quarto
Environment Management renv

βš™οΈ Getting Started

Prerequisites

  • R 4.3+
  • RStudio (recommended)
  • Git

Installation

Clone the Repository

# Clone the repository
git clone https://github.com/jep9731/academic-MSDS411-coursework.git
cd academic-MSDS411-coursework

Restore R Environment

# Create and activate environment
install.packages("renv")
renv::restore()

Install Required Packages Manually (Optional)

install.packages(c(
  "tidyverse",
  "data.table",
  "cluster",
  "factoextra",
  "caret",
  "tidymodels",
  "arules",
  "arulesViz",
  "Rtsne",
  "umap",
  "keras",
  "tensorflow",
  "plotly",
  "lattice"
))

πŸ“‹ Assignments & Projects

Assignment 1 β€” Political Discourse & Dimensionality Reduction

Methods: PCA, Feature Engineering

Context: The conventional view of political discourse treats voters and politicians as falling on a single left-to-right, liberal-to-conservative dimension. This assignment challenges that assumption, exploring whether social and political attitudes are better understood as multidimensional. Data are sourced from the Pew Research Center, requiring up-front data preparation before analysis.

Management Problem: You are working as a pollster or political consultant serving a hypothetical client β€” a lobbyist, politician, or news organization. Your task is to gather and tag documents related to an upcoming election or piece of legislation. Beyond simple source-level labels (e.g., "Republican" vs. "Democrat"), you develop a more nuanced, data-driven categorization of political leanings using unsupervised methods.

Reference: Hatley (2018) illustrates R methods for working with Pew Research Center data.


Assignment 2 β€” Housing Market Cluster Analysis

Methods: K-Means Clustering, Hierarchical Clustering

Dataset: Melbourne Housing Market (January 2016)

Context: Cluster analysis is applied to identify natural groupings among residential properties in the Melbourne housing market.

Management Problem: You own a real estate firm and want to identify distinct housing types to support marketing, territory assignment, and property appraisal. As a real estate investor, you are also interested in identifying undervalued properties by detecting anomalies or outliers relative to comparable homes.


Assignment 3 β€” Unsupervised Pretraining for Credit Risk

Methods: Unsupervised Pretraining, Logistic Regression, Dimensionality Reduction

Dataset: German Credit (OpenML #31)

Context: This assignment evaluates whether unsupervised learning can improve the performance of a downstream supervised classifier. Traditional logistic regression has been used to classify credit card applicants as good or bad risks.

Management Problem: You work for a credit card company aiming to grow its customer base without taking on excessive risk. Prior analysis established that misclassifying a bad customer costs five times as much as declining a good one. The question is whether unsupervised pretraining β€” learning latent structure in the data before supervised training β€” can reduce misclassification costs and improve model accuracy.


Assignment 4 β€” Fraud Detection via Anomaly Detection

Methods: DBSCAN, Local Outlier Factor (LOF), Isolation Forest

Context: Fraud detection is framed as an anomaly detection problem applied to sales transaction data. The company suspects some sales representatives may be misreporting product sales to inflate commissions.

Management Problem: You are asked to recommend a fraud detection method by comparing two approaches β€” DBSCAN/LOF and Isolation Forest β€” across 133,731 unlabeled training transactions spanning 798 products. Evaluation is conducted on 15,732 labeled test transactions (14,462 normal, 1,270 fraudulent). Given the class imbalance, the primary evaluation metric is F1 score, combining precision and recall. Analysis includes EDA and supervised evaluation using binary labels (normal vs. fraud).


🎯 Learning Objectives

By the end of this course, students are able to:

  • Apply dimensionality reduction techniques to continuous multivariate data
  • Identify and interpret natural groupings using a variety of clustering methods
  • Mine association rules and model dependencies in categorical data
  • Visualize high-dimensional data using scaling and embedding techniques
  • Build and deploy autoencoder-based anomaly detection systems
  • Communicate unsupervised learning findings clearly to technical and non-technical audiences

πŸ“¬ Contact

For questions related to coursework or collaboration, reach out via GitHub Issues or the contact information below.

Student Joshua Pasaye
Email joshuapasaye2027@u.northwestern.edu
Program Master of Science in Data Science
Course MSDS 411 β€” Unsupervised Learning Methods

This repository contains coursework completed as part of the MSDS 411-DL: Unsupervised Learning Methods course in the Master of Science in Data Science program.

About

Graduate-level projects in unsupervised machine learning, including PCA, clustering, dimensionality reduction, anomaly detection, association rule mining, and autoencoders implemented in R.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0