The Importance of Model Selection in Machine Learning
Tags: Data Visualization, Millennials, Python

From avocado toast to interpreting millennial homeownership through classification

Origin

Three years ago, I came across a headline that stopped me in my tracks.

It read: “Millionaire to Millennials: Stop Buying Avocado Toast if you Want to Buy a Home.”

At first, I felt ashamed, and I wasn’t alone. My friends and I took turns in the group chat confessing the numerous times we had spent money on avocado toast. Yes, we had perfectly good avocados at home, but was brunch really getting in the way of owning a home?

We took a step back. We did the math. We researched how different millennial circumstances were from that of our predecessors (ie. the economy, the cost of education, the rising real estate costs) and moved on with our lives.

Kind of. In the back of my mind, I always thought: one day when I have the skills, I’m going to get to the bottom of this atrocious claim, with cold hard data.

The craziness of 2020 has reshaped my view of what is shocking and unprecedented in the news, but I thought back to this headline while brainstorming my second solo project at Metis Data Science Bootcamp.

I enrolled in Metis after a few years of working in analytics. What’s always fulfilled me — my career mission as a whole — is using data to unlock potential within people, products, and processes. Any day in which I’m able to use data to empower someone/something to be the best that they can be is a good day in my book.

When the pandemic hit in March and the world came to an abrupt standstill, I fully realized (along with many others) just how short life is. I knew that there was no time to waste to be the best that I could be — to gain a deeper mastery of data science and equip myself with more technical skills to supercharge my mission.

When the supervised machine learning unit rolled around in the bootcamp, I knew that it would be the perfect time for me to build a binary classification model to delineate millennial homeowners from their renter peers and, in the process, understand what it takes to complete this rite of passage for my generation.

Selecting a model for your machine learning project is almost as important as selecting a home. (Photo by: Jessica Bryant | Pexels)

Data

I used the U.S. Bureau of Labor Statistics’ National Longitudinal Survey (’97) as my data source. The survey followed a group of early U.S. millennials (born 1980–1984) for 20 years, recording their responses on 80,000 variables. The majority of my data collection and cleaning process focused on understanding the survey methods and variable definitions. In the end, I extracted 26 variables for my study, taking a snapshot of the subjects at age 30 — a key milestone of adulthood.

Baseline Model

Model selection is a key step in every data science project and requires perhaps the most conceptual foundational knowledge.

http://www.mtbtrailstrust.org.nz/vox/video-Hnt-v-Gal-Liv-hd1.html

http://www.mtbtrailstrust.org.nz/vox/video-Hnt-v-Gal-Liv-hd2.html

http://www.mtbtrailstrust.org.nz/vox/video-Hnt-v-Gal-Liv-hd3.html

http://www.mtbtrailstrust.org.nz/vox/video-Hnt-v-Gal-Liv-hd4.html

http://www.mtbtrailstrust.org.nz/vox/video-Hnt-v-Gal-Liv-hd5.html

http://www.mtbtrailstrust.org.nz/vox/video-Sydney-v-Super-Fight-Live-boxing-ck6.html

http://www.mtbtrailstrust.org.nz/vox/video-Sydney-v-Super-Fight-Live-boxing-ck7.html

http://www.mtbtrailstrust.org.nz/vox/video-Sydney-v-Super-Fight-Live-boxing-ck8.html

http://www.mtbtrailstrust.org.nz/vox/video-Sydney-v-Super-Fight-Live-boxing-ck9.html

http://www.mtbtrailstrust.org.nz/vox/video-Sydney-v-Super-Fight-Live-boxing-ck10.html

http://www.mtbtrailstrust.org.nz/vox/video-Sy-v-Su1.html

http://www.mtbtrailstrust.org.nz/vox/video-Sy-v-Su2.html

http://www.mtbtrailstrust.org.nz/vox/video-Sy-v-Su3.html

http://www.mtbtrailstrust.org.nz/vox/video-Sy-v-Su4.html

http://www.mtbtrailstrust.org.nz/vox/video-Sy-v-Su5.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-bk04.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-bk03.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-bk02.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-bk01.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak09.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak08.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak07.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak06.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak05.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak04.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak03.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak02.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-ak01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Gallen-v-Hunt-Fight-Lm01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Gallen-v-Hunt-Fight-Lm02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Gallen-v-Hunt-Fight-Lm03.html

http://www.mtbtrailstrust.org.nz/vox/Video-Gallen-v-Hunt-Fight-Lm04.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm03.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm04.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm05.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm06.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-Lm07.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm03.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack1.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack2.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack3.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack4.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack5.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-Crack6.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tsz-v-Mor-bx-Live.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tsz-v-Mor-bx-Live1.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tsz-v-Mor-bx-Live3.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tsz-v-Mor-bx-Live4.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tsz-v-Mor-bx-Live2.html

https://www.openshutters.com.au/rwc/video-Sy-v-Su1.html

https://www.openshutters.com.au/rwc/video-Sy-v-Su2.html

https://www.openshutters.com.au/rwc/video-Sy-v-Su3.html

https://www.openshutters.com.au/rwc/video-Sy-v-Su4.html

https://www.openshutters.com.au/rwc/video-Sy-v-Su5.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-mr01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-mr02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-mr03.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-mr04.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fight-mr05.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg1.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg2.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg3.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg4.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg5.html

http://www.mtbtrailstrust.org.nz/vox/video-mh-v-pg6.html

http://www.mtbtrailstrust.org.nz/vox/Video-A-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-A-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-A-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-A-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-A-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-B-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-B-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-B-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-B-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-B-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-bn-v-f1.html

http://www.mtbtrailstrust.org.nz/vox/Video-bn-v-f2.html

http://www.mtbtrailstrust.org.nz/vox/Video-bn-v-f3.html

http://www.mtbtrailstrust.org.nz/vox/Video-bn-v-f4.html

http://www.mtbtrailstrust.org.nz/vox/Video-bn-v-f5.html

http://www.mtbtrailstrust.org.nz/vox/Video-H-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-H-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-H-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-H-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-H-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-j-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-j-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-j-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-j-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-j-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-f.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-g.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-h.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-i.html

http://www.mtbtrailstrust.org.nz/vox/Video-JD-v-j.html

http://www.mtbtrailstrust.org.nz/vox/Video-K-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-K-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-K-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-K-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-K-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-L-v-a.html

http://www.mtbtrailstrust.org.nz/vox/Video-L-v-b.html

http://www.mtbtrailstrust.org.nz/vox/Video-L-v-c.html

http://www.mtbtrailstrust.org.nz/vox/Video-L-v-d.html

http://www.mtbtrailstrust.org.nz/vox/Video-L-v-e.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Tszyu-v-Morgan-Fight-Liv-lm03.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fights-Lm01.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fights-Lm02.html

http://www.mtbtrailstrust.org.nz/vox/Video-Morgan-v-Tszyu-Fights-Lm03.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fights-Lm01.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fights-Lm02.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fights-Lm03.html

https://www.openshutters.com.au/rwc/Video-Gallen-v-Hunt-Fight-Liv-Lm01.html

https://www.openshutters.com.au/rwc/Video-Gallen-v-Hunt-Fight-Liv-Lm02.html

https://www.openshutters.com.au/rwc/Video-Gallen-v-Hunt-Fight-Liv-Lm03.html

https://www.openshutters.com.au/rwc/Video-Gallen-v-Hunt-Fight-Liv-Lm04.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fight-Liv-Lm01.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fight-Liv-Lm02.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fight-Liv-Lm03.html

https://www.openshutters.com.au/rwc/Video-Morgan-v-Tszyu-Fight-Liv-Lm04.html

https://www.openshutters.com.au/rwc/video-Tszyu-v-Morgan-liv-hq1.html

https://www.openshutters.com.au/rwc/video-Tszyu-v-Morgan-liv-hq2.html

https://www.openshutters.com.au/rwc/video-Tszyu-v-Morgan-liv-hq3.html

https://www.openshutters.com.au/rwc/video-Tszyu-v-Morgan-liv-hq4.html

https://www.openshutters.com.au/rwc/video-Tszyu-v-Morgan-liv-hq5.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-liv-hq1.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-liv-hq2.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-liv-hq3.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-liv-hq4.html

http://www.mtbtrailstrust.org.nz/vox/video-Tszyu-v-Morgan-liv-hq5.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd1.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd2.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd3.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd4.html

http://www.mtbtrailstrust.org.nz/vox/video-Gn-v-Ht-bd5.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz1.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz2.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz3.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz4.html

http://www.mtbtrailstrust.org.nz/vox/video-Ht-v-Gn-nz5.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight1.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight2.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight3.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight4.html

http://www.mtbtrailstrust.org.nz/vox/video-Mk-v-Ht-Fight5.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight1.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight2.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight3.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight4.html

http://www.mtbtrailstrust.org.nz/vox/video-PG-v-MH-Fight5.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight1.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight2.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight3.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight4.html

http://www.mtbtrailstrust.org.nz/vox/video-Pl-v-Gn-Fight5.html

http://www.dpa.org.nz/rtc/video-Tszyu-v-Morgan-liv-hq1.html

http://www.dpa.org.nz/rtc/video-Tszyu-v-Morgan-liv-hq2.html

http://www.dpa.org.nz/rtc/video-Tszyu-v-Morgan-liv-hq3.html

http://www.dpa.org.nz/rtc/video-Tszyu-v-Morgan-liv-hq4.html

http://www.dpa.org.nz/rtc/video-Tszyu-v-Morgan-liv-hq5.html

http://www.dpa.org.nz/rtc/Video-Tszyu-v-Morgan-Fight-Liv-lm01.html

http://www.dpa.org.nz/rtc/Video-Tszyu-v-Morgan-Fight-Liv-lm02.html

http://www.dpa.org.nz/rtc/Video-Tszyu-v-Morgan-Fight-Liv-lm03.html

http://www.dpa.org.nz/rtc/Video-Morgan-v-Tszyu-Fights-Lm01.html

http://www.dpa.org.nz/rtc/Video-Morgan-v-Tszyu-Fights-Lm02.html

http://www.dpa.org.nz/rtc/Video-Morgan-v-Tszyu-Fights-Lm03.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd1.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd2.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd3.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd4.html

http://www.dpa.org.nz/rtc/video-Gn-v-Ht-bd5.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz1.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz2.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz3.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz4.html

http://www.dpa.org.nz/rtc/video-Ht-v-Gn-nz5.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight1.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight2.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight3.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight4.html

http://www.dpa.org.nz/rtc/video-Mk-v-Ht-Fight5.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight1.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight2.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight3.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight4.html

http://www.dpa.org.nz/rtc/video-PG-v-MH-Fight5.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight1.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight2.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight3.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight4.html

http://www.dpa.org.nz/rtc/video-Pl-v-Gn-Fight5.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq1.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq2.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq3.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq4.html

http://www.mtbtrailstrust.org.nz/vox/videos-Tszyu-v-Morgan-qq5.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq1.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq2.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq3.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq4.html

http://www.dpa.org.nz/rtc/videos-Tszyu-v-Morgan-qq5.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq1.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq2.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq3.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq4.html

https://www.openshutters.com.au/rwc/videos-Tszyu-v-Morgan-qq5.html

https://www.openshutters.com.au/rwc/video-Ts-v-Fi-au-liv1.html

https://www.openshutters.com.au/rwc/video-Ts-v-Fi-au-liv2.html

https://www.openshutters.com.au/rwc/video-Ts-v-Fi-au-liv3.html

https://www.openshutters.com.au/rwc/video-Ts-v-Fi-au-liv4.html

https://www.openshutters.com.au/rwc/video-Ts-v-Fi-au-liv5.html

http://www.dpa.org.nz/rtc/video-Ts-v-Fi-au-liv1.html

http://www.dpa.org.nz/rtc/video-Ts-v-Fi-au-liv2.html

http://www.dpa.org.nz/rtc/video-Ts-v-Fi-au-liv3.html

http://www.dpa.org.nz/rtc/video-Ts-v-Fi-au-liv4.html

http://www.dpa.org.nz/rtc/video-Ts-v-Fi-au-liv5.html

https://www.thehomeplow.com/doc/video-Ts-v-Fi-au-liv1.html

https://www.thehomeplow.com/doc/video-Ts-v-Fi-au-liv2.html

https://www.thehomeplow.com/doc/video-Ts-v-Fi-au-liv3.html

https://www.thehomeplow.com/doc/video-Ts-v-Fi-au-liv4.html

https://www.thehomeplow.com/doc/video-Ts-v-Fi-au-liv5.html

http://www.mtbtrailstrust.org.nz/vox/video-Ts-v-Fi-au-liv1.html

http://www.mtbtrailstrust.org.nz/vox/video-Ts-v-Fi-au-liv2.html

http://www.mtbtrailstrust.org.nz/vox/video-Ts-v-Fi-au-liv3.html

http://www.mtbtrailstrust.org.nz/vox/video-Ts-v-Fi-au-liv4.html

http://www.mtbtrailstrust.org.nz/vox/video-Ts-v-Fi-au-liv5.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now1.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now2.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now3.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now4.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now5.html

http://www.dpa.org.nz/rtc/video-tszyu-v-morgan-liv.fight-now6.html

http://www.dpa.org.nz/rtc/video-gallen-v-hunt-liv.fight-now1.html

http://www.dpa.org.nz/rtc/video-gallen-v-hunt-liv.fight-now2.html

http://www.dpa.org.nz/rtc/video-gallen-v-hunt-liv.fight-now3.html

http://www.dpa.org.nz/rtc/video-gallen-v-hunt-liv.fight-now4.html

http://www.dpa.org.nz/rtc/video-gallen-v-hunt-liv.fight-now5.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now1.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now2.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now3.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now4.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now5.html

https://www.openshutters.com.au/rwc/video-tszyu-v-morgan-liv.fight-now6.html

https://www.openshutters.com.au/rwc/video-gallen-v-hunt-liv.fight-now1.html

https://www.openshutters.com.au/rwc/video-gallen-v-hunt-liv.fight-now2.html

https://www.openshutters.com.au/rwc/video-gallen-v-hunt-liv.fight-now3.html

https://www.openshutters.com.au/rwc/video-gallen-v-hunt-liv.fight-now4.html

https://www.openshutters.com.au/rwc/video-gallen-v-hunt-liv.fight-now5.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now1.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now2.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now3.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now4.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now5.html

http://www.mtbtrailstrust.org.nz/vox/video-tszyu-v-morgan-liv.fight-now6.html

http://www.mtbtrailstrust.org.nz/vox/video-gallen-v-hunt-liv.fight-now1.html

http://www.mtbtrailstrust.org.nz/vox/video-gallen-v-hunt-liv.fight-now2.html

http://www.mtbtrailstrust.org.nz/vox/video-gallen-v-hunt-liv.fight-now3.html

http://www.mtbtrailstrust.org.nz/vox/video-gallen-v-hunt-liv.fight-now4.html

http://www.mtbtrailstrust.org.nz/vox/video-gallen-v-hunt-liv.fight-now5.html

We’d reviewed a number of supervised machine learning models in class like Logistic Regression, K-Nearest Neighbors, Naive Bayes, Random Forest, and Gradient Boost. The first model I eliminated off the bat was Naive Bayes: the model’s underlying assumption is that all features are independent of each other, which would be irresponsible to assume given that I was working with demographic data (for instance, factors like gender, race, and age are rarely independent of salary).

That left me with four remaining models.

I’m an advocate for the iterative process school of product design, so my goal for every project is to establish a minimal viable product (MVP) as quickly as possible, then loop back and perfect the subsequent iterations from there.

In this case, my MVP would be a baseline model, which made Random Forest the perfect choice. Tree-based models are very functional right out of the box — no need to fill in missing values or even decode the longitudinal study variables into something a layperson can understand, so I was able to build off my messy, raw dataset. Random Forest, unlike its debatably more powerful tree based sibling Gradient Boost, also has a built-in parameter for balancing class weights in scikit-learn. I took full advantage of this parameter, as the class of millennials who owned permanent homes (houses and apartments) in my data were outnumbered 2:1 by their renter counterparts.

For every millennial home owner, there’s more than 2 millennial renters.

My Random Forest model produced great scores: recall of 0.73 and precision of 0.55, meaning that my model was able to capture 73% of all millennial homeowners in my data, and out of the predicted homeowners, 55% were homeowners. (If you’re newer to classification, you’re probably thinking, “what about accuracy??” Here’s a great article by Will Koehrsen that explains why recall and precision are more effective metrics.) Amazed at Random Forest’s predictive power, I could’ve stopped there, with a week to spare before my deadline, but my goal was interpretability.

Final Model

In data science, it can be easy to focus solely on a model’s output metrics as the bar for success, so it’s important to zoom out and think back to the primary question you’re trying to answer. Mine was to interpret the factors that make up a millennial homeowner, so if I couldn’t pinpoint the impact each feature had on my classification output, no matter how predictively powerful my model was, my project would be missing the point. Random Forest, despite its off the bat predictive power, was a model that did not support interpretation. It was essentially a black box.

I wanted the best of both worlds — predictive power and interpretability, so I set out to make a Logistic Regression model (the most interpretable of all classification models) that could be as powerful as Random Forest.

Logistic Regression is simple and elegant but much more sensitive to noise in data compared to tree based models. What you get is really only as good as what you put in — which meant a much higher bar for input data.

I spent days cleaning my data thoroughly: filling in null values and feature engineering. I also spent time on parameter tuning — applying LASSO regularization (increased strength of C= 0.4) and balancing class weights (which worked better than oversampling using RandomSampler()). When applied to the test holdout set, my final Logistic Regression model generated a recall of 0.73 and a precision of 0.53 — fully matching the scores originally generated by my baseline Random Forest model.

I was able to match the predictive power of my Random Forest baseline with the interpretability of my final Logistic Regression model. I had achieved the best of both worlds!

Furthermore, when looking at my recall vs. precision tradeoff, I didn’t see a need to adjust the precision-recall threshold, because I wanted to emphasize recall in my model. Aside from interpretation, I knew that the business use of my model would most likely be applicable towards outreach/marketing purposes: anyone who wants to reach the ever-elusive home-owning millennial. Casting a wide net is key for outreach/marketing, so the opportunity cost of my model leaving out a millennial who is a homeowner (false negative) is greater than reaching a millennial who is not currently a homeowner (false positive).

Feature Interpretation

Top 5 features impacting millennial homeownership in my final model.

While current financial assets may be one factor in home ownership, it is hardly the key factor. More important were past relocations and marriage, with attainment of a Bachelor’s Degree and race (subjects who identify as Black Americans) rounding out the rest of the Top 5.

For me, the biggest surprise from my model was its most impactful feature: number of relocations between age 12 to 30. Were these relocations indicative of an inherited nomadic lifestyle which made subjects less likely to purchase permanent homes? Or were they symptoms of systemic poverty leading to involuntary displacement (like the foster care system)? That’s what I want to investigate most in my next steps.

For the final part of my project, I created a Tableau dashboard to visualize the relocation feature, as well as an in-depth view of each subject in my data, which allows for further exploration.

Interactive visuals for further interpretation and exploration.

I came into this project with 1 simple question: “What makes a millennial homeowner” and wrapped up with even more questions and motivations for next steps. While the longitudinal study I pulled data from conducted its survey in a manner representative of the United States in 1997, 23 years later, we know that there needs to be more nuance in representation (ie. expanding the study’s 4 categories for race to be more inclusive), especially, as we saw above, when race is one of the top factors in homeownership. I would also be interested to see where the subjects are at age 35, once more recent data from the study is released.

The possibilities never end once you start asking questions, and one thought begets a dozen more, but that’s the greatest beauty of data science. There’s always the next iteration and the next question to be answered!

(Speaking of questions, for anyone interested in the nitty gritty, check out my GitHub repo. If you’d like to chat more about this project or anything else data related, feel free to reach out on LinkedIn.)