From the course: Applied AI for IT Operations (AIOps)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating the LSI model

Creating the LSI model - Python Tutorial

From the course: Applied AI for IT Operations (AIOps)

Start my 1-month free trial

Creating the LSI model

- [Instructor] Having prepared the data for LSI, we will now convert the document vector into an LSI model and measure similarities between the documents. This is a multi step process. First, we need to create a dictionary based on the document vectors. The dictionary is a unique list of words found in these document vectors. To do this, we use the corpora.dictionary method. This generates a dictionary with words and corresponding identifiers. We will then print the dictionary. Let's run this code and review the results. As we can see, each of the unique words in the document vector are listed with a corresponding identifying number. Next, we need to convert the document vector into a corpus based on the identifiers in the dictionary. We use the doc2bow method to convert the vectors into this corpus. We print the document and the corpus for the second document in the list to compare the results. Let's execute this code now. As we can see, each word in the document is mapped to a…

Contents