Page 3 · Projects

Understanding users, designing digital products and analytics, founding a startup to serve a real need.

A wider set of optimization, machine learning, consulting, entrepreneurship, UX, hardware, and competition work, the range behind the résumé.

University of MinnesotaOperations Research · Fall 2024

Airline Network Optimization & Optimal Pricing

  • Optimization
  • AMPL
  • Gurobi
  • Python
  • Operations Research
Two optimization models sit behind this project, and both are connected below: the shortest-path model runs from a Python port of my AMPL code, and the pricing model shows our optimal Gurobi solution.

Explore the airline models

10 airports, 4 hubs (2, 4, 6, 7). Pick a trip to see Model 1's cheapest path and Model 2's scheduled flights, how full each plane is, what you're charged, and what the flights cost.

Model 1 · Cheapest connections

Shortest-path LP
12345678910
Hub Spoke Cheapest path

Cheapest route

1 → 2 → 4 → 3

Operating cost along the path: $18,773

min Σ costij·xij subject to flow balance: the origin sends one unit, the destination receives it, every other airport passes it on. Solved for all 90 airport pairs.

Model 2 · Tickets & pricing

Profit-maximizing, Gurobi

Your ticket price

$461

Tickets sold, 13

0

The planes you'll be on

  1. 12

    MorningSmall jet
    75 / 75 seats100% full

    Flight operating cost: $1,500

  2. 24

    MiddayMid-size jet
    73 / 150 seats49% full

    Flight operating cost: $15,273

  3. 43

    EveningSmall jet
    75 / 75 seats100% full

    Flight operating cost: $2,000

Cost of the flights on this trip: $18,773, shared by everyone on board.

Optimal daily profit

$1,555,125

vs. our hand-built plan

+$99,828

+6.9% a day

Ticket revenue − flight costs

$1,795,142$240,016

Seats filled across 30 flights

2,517 / 3,350 (75%)

All 30 scheduled flights

Load factor of every flight in the optimal plan; your trip is highlighted. Hover a bar for details.

Morning

Midday

Evening

Model 1 is my AMPL shortest-path model ported to Python (SciPy/HiGHS) with identical results. Model 2 shows the optimal Gurobi solution from our final report; plane loads are computed from its flight capacity constraints.

Situation

  • No one in my group of 4 knew how to code optimization models.
  • We were given an optimization problem way too complex for an LLM to model at the time.

Task

  • Solve a problem with a number of airports, airplanes, niche costs, constraints and a demand/price function.
  • Build a feasible solution in Excel and write an initial report.
  • Build an optimal solution in AMPL and write a final report.

Action

  • I spent days on the problem and went to office hours many times.
  • I allocated tedious but simple constraint modeling to some of my group mates.
  • I allocated aspects of the report to other group mates.
  • The final model did not work at first, but the solution came to me in a dream and I woke up and finished the code.

Results

  • Optimal daily profit of $1,555,125, which is $99,828 (6.9%) more than our feasible Excel solution.
  • Highly ranked in the class.

$1.56M

Optimal daily profit across the network (AMPL + Gurobi).

+6.9%

More profit per day than our hand-built Excel plan.

90

Origin–destination pairs routed by the shortest-path model.

Analytics for Healthcare · IE 5561Machine learning · R

Heart Disease Prediction Model

  • Machine Learning
  • Classification
  • Healthcare
  • Model Selection
  • R
  • Python
A classification model estimating the probability of heart disease from patient indicators. Try the live model below, then read through how I chose it.

Heart disease risk estimator

The final logistic regression from my report, running live: 7 predictors fit on 297 Cleveland Clinic patients. Adjust a patient and watch the probability and the reasons behind it.

Sex

Exercise-induced angina

153 bpm

Peak heart rate during the exercise test.

0.8

ECG ST-segment depression during exercise relative to rest, in mm.

0

0–3; more visible blockage means more colored vessels.

Predicted probability

Classified: no heart disease

The report's cut-off is 50%. At that threshold this model scores 84.5% on all 297 patients and 84.2% under leave-one-out cross validation.

What moved the estimate

Change in log-odds versus an average patient in the data: β × (value − average).

  • Sex+0.28
  • Chest pain type0.08
  • Max heart rate0.06
  • Exercise angina0.31
  • ST depression0.12
  • Blocked vessels0.70
  • Thallium test0.64
Lowers riskRaises risk

log-odds z =

-2.862 + 0.877·sex + 0.522·cp 0.0183·thalach + 0.933·exang + 0.481·oldpeak + 1.040·ca + 0.372·thal

z = -1.715  →  p = 1 / (1 + e−z) = 0.153

Coefficients come from my R model (glm, binomial), re-fit in a Python port that matches R to six decimals and exported to this page. A class project on 1988 data, not medical advice.

How I found a good model

Six steps from the raw data to the model behind the estimator.

  1. 01

    Load & clean

    303 patients → 297 complete rows. 137 with disease, 160 without: balanced enough to model.

  2. 02

    Explore

    Correlation matrix, pairs plots and box plots. Oldpeak and blocked vessels (ca) separate the classes; cholesterol barely does.

  3. 03

    Select variables

    Logistic regression on all 13 predictors, keep the significant ones: sex, cp, thalach, exang, oldpeak, ca, thal.

  4. 04

    Validate

    Train/test splits at 50, 75 and 80% (75% best, 12% error), bootstrap standard errors, then leave-one-out CV: 15.8% error.

  5. 05

    Compare methods

    LDA, QDA, KNN, random forest, ridge and lasso on the same 75/25 split, plus subset selection and k-means as checks.

  6. 06

    Choose

    Penalized models win at 86.7%. LDA beating QDA says the data is mostly linear; random forest is the fallback if assumptions look shaky.

Test accuracy by method

Same 75/25 split (logistic shown with leave-one-out CV). Hover a row for details.

80%82%84%86%88%90%
Ridge (penalized logistic)86.7%
Lasso (penalized logistic)86.7%
Random forest85.3%
LDA85.3%
KNN (k = 20)85.3%
Logistic (LOOCV)84.2%
QDA82.7%

KNN: accuracy vs. k

Small k overfits; around k = 20 balances bias and variance.

80%84%88%k = 1: 80.0%k=1k = 3: 82.7%k=3k = 10: 84.0%k=10k = 20: 85.3%k=2085.3%

Random forest variable importance

Mean decrease in accuracy when a variable is scrambled.

  • Blocked vessels (ca)25.3
  • Thallium test18.1
  • Chest pain type17.0
  • ST depression15.7
  • Sex15.5
  • Max heart rate10.7
  • Exercise angina8.4

The math

Logistic regression

p(x) = 1 / (1 + e−(β₀ + β₁x₁ + … + β₇x₇))

β estimated by maximum likelihood (iteratively reweighted least squares). Classify as disease when p > 0.5.

Leave-one-out cross validation

CV(n) = (1/n) Σi I(yi ≠ ŷ(−i))

Fit 297 models, each leaving one patient out, and score the one left out. Result: 15.8% error.

Ridge and lasso

minβ −ℓ(β) + λ Σ βj²  |  −ℓ(β) + λ Σ |βj|

Penalizing large coefficients trades a little bias for less variance. λ chosen by 10-fold CV (cv.glmnet).

Linear discriminant analysis

δk(x) = xᵀΣ⁻¹μk − ½μkᵀΣ⁻¹μk + log πk

Shared covariance Σ gives linear boundaries; QDA's class-specific Σ scored lower, evidence the data is mostly linear.

Final model coefficients

Logistic regression coefficients for the final heart disease model
TermEstimateStd. errorzp-value
(Intercept)-2.86191.6109-1.780.076
sex0.87710.41462.120.034
cp0.52170.18242.860.004
thalach-0.01830.0086-2.120.034
exang0.93320.39772.350.019
oldpeak0.48100.17512.750.006
ca1.04030.22394.65< 0.001
thal0.37180.09523.90< 0.001
Minnesota Twins Baseball · MinneMUDACMar. 2023 · 2nd Place Finals

MinneMUDAC Data Science Competition

  • Forecasting
  • Machine Learning
  • Python
  • Strategy
  • 2nd Place
Random forest attendance forecast (mean error 3,450).
Slide: random forest regression of attendance, mean error 3,450

Random forest attendance forecast (mean error 3,450).

Stacking six models into one forecast.
Slide: stacked ensemble of lasso, MLP, SVR, SVM, random forest and XGBoost

Stacking six models into one forecast.

Financial analysis: 2023 revenue forecast.
Slide: Twins revenue by year and 2023 forecast

Financial analysis: 2023 revenue forecast.

Placed 2nd in the finals with a machine-learning forecasting model paired with a promotional strategy recommendation for the Minnesota Twins, projected to increase sales by up to $10 million.

2nd

Place in the competition finals.

$10M

Projected sales lift from the recommended promotions.

ML

Forecasting model driving the strategy.