Adding spaCy Word Vectors to a Keras Model

A close-up photo of a fountain pen writing in cursive on lined paper with black ink.
A close-up photo of a fountain pen writing in cursive on lined paper with black ink.
Photo by Aaron Burden on Unsplash
  1. The story so far
  2. Exploratory data analysis
  3. Imputing missing values
  4. Optimizing data types
  5. Creating document vectors
  6. Building the pipeline
  7. Evaluating the model
  8. Next steps

The story so far

A few months ago, I built a neural network regression model to predict loan risk, training it with a public dataset from LendingClub. Then I built a public API with Flask to serve the model’s predictions.

Then last month, I decided to put my model to the test and found out that my model can pick grade A loans better than LendingClub!

But I’m not done. Now that I’ve learned the fundamentals of natural language processing…


Pitting My Neural Network Against a Corporate Benchmark

Photo by The New York Public Library on Unsplash
  1. Introduction
  2. Ground rules
  3. Test metric
  4. LendingClub’s turn
  5. My turn
  6. Victory!
  7. Further reading

Introduction

In case you missed it, I built a neural network to predict loan risk using a public dataset from LendingClub. Then I built a public API to serve the model’s predictions. That’s nice and all, but… how good is my model?

Today I’m going to put it to the test, pitting it against the risk models of the very institution who issued those loans. That’s right, LendingClub included their own calculated loan grades (and sub-grades) in the dataset, so all the pieces are in place for the most…


In-Depth Analysis

A Step-by-Step Guide (With a Healthy Dose of Data Cleaning)

A few dollar bills floating around a laptop with a screen covered in green code.
A few dollar bills floating around a laptop with a screen covered in green code.
Photo by NeONBRAND on Unsplash
  1. Introduction
  2. Data cleaning
  3. Building the neural networks
  4. Saving the final model
  5. Building the API
  6. Further reading

Introduction

LendingClub is the world’s largest peer-to-peer lending platform. Until recently (through the end of 2018), LendingClub published a public dataset of all loans issued since the company’s launch in 2007. I’m accessing the dataset via Kaggle.

(2260701, 151)

With 2,260,701 loans to look at and 151 potential variables, my goal is to create a neural network model with TensorFlow and Keras to predict the fraction of an expected loan return that a prospective borrower will pay back. This will require a lot of…


A Quick JavaScript How-To Guide

A view of Chrome’s developer console
A view of Chrome’s developer console

Ever wanted to create a browser console log that persists after a page reloads? Sure, that isn’t a problem if you enable the “preserve log” option in your developer console, but hear me out.

Say you have a JavaScript framework with a development server that usually hot-reloads when you update files while the server is running. In the few cases where hot reloading isn’t possible and the page has to fully reload, you want to warn your users and explain why this is happening. It’d be nice to just log a warning to the console with console.warn(), but the moment…


And what isolation means for nomads

My goodness gracious, this coronavirus epidemic keeps looking worse every single day. From what I’m reading lately, it now looks like the need for social distancing is going to extend for several more months, not just several more weeks. Most frightening, look at these maps of projected infection rates in the United States by July 1 based on three different scenarios:

Source: The New York Times

In the interactive map farther down in the article, move the timeline just a month later to August 1 and it looks even worse:


Photo by Victor Xok on Unsplash

The tragic death of Samantha Josephson on March 29, 2019, is extremely heart-wrenching and was not at all her fault. Her parents’ mission to educate the world on rideshare safety in her memory is noble and absolutely worth pursuing. But unfortunately, their central recommendation and social media campaign of asking your driver “What’s my name?” when you get in the car is the exact opposite of what you should do and in fact puts rideshare drivers at risk.

Uber and Lyft have long provided the following four key pieces of information to identify your driver:

  1. The make, model, and color…


Or, Betterment vs Wealthfront 2017

I’m a recovering mutual fund investor. Not that I ever thought that mutual funds were a good idea — I just didn’t think about it. But now I’ve done just the slightest bit of research and found out how to save at least hundreds of thousands of dollars in opportunity cost over the coming decades.

My dad referred me to Edward Jones my first year out of college to buy life insurance.* Then they convinced my wife and me to open a couple of IRAs with them. I have to mention first that I’m glad they did, because that was…

Ty Mick

Software developer, former RV nomad.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store