Forecasting NJ Transit Train Delays:

The FLEX Commuter

With the recent shift to hybrid work, commuters now have more flexibility when they choose to ride. With greater options comes less patience for delays. Our app The FLEX Commuter takes the guesswork out of planning a commute and uses a sophisticated machine-learning model to predict train delays in advance, helping commuters maximize their time.

The Northeast Corridor (NEC) is a rail commuter line that connects Trenton, New Jersey to New York’s Penn Station. 78% of all NJ Transit riders use the line and the average delay in FY 2015 was 17 minutes. We decided to focus on this line as a pilot given the popularity of the route and the definitive gap in operational efficiency, but we hope to expand our app to other NJ Transit train lines in the future.

Here, we provide the code we used to create the models for this app. Our approach uses linear regression models to predict the number of minutes a train will be delayed, to a high degree of accuracy. Follow along to predict delays for a train near you.