## Poetry Analysis

### LDA Algorithm

This section dives into a textual analysis of a group of 48 personal poems which I compiled into a collection called **In A Word**. As I began to edit my poems, I began to wonder how exactly each of the words were related to each other. I began to wonder if there were a discernible pattern that I could elicit with mathematics. As it turns out, a common text analysis algorithm called Latent Dirichlet Allocation (LDA) can help determine relationships between words in a text.

The LDA algorithm takes a body of text and splits it into however many topics (i.e. groups) that the user believes are structured in the text. Analysis of LDA can give likelihoods of whether the model fit and the number of topics chosen actually represent the truth behind the data. The visualizations above come from 12 poems each which I determined to have 23 topics. The point in the center represents the word with the most connections to other words, and each line represents such a connection.