Item-to-Item recommendation using DNN I am new to DNN still learning, have a need to build item-to-item content based recommendation using DNN. For example, say I have a column of strings where each row represents a document I need to compute the cosine similarity of this column and recommend similar documents.
id   document

1     &quot;hi this document is about science&quot;

2     &quot;hi this document is about wars&quot;  
3     &quot;This document is about peace&quot;

now need to train based on document and column and recommend all the documents similar to a given document. I have solved this problem by using cosine similarity in ML now wanted to achieve the same in DNN (Deep Neural Nets). I have spent a lot of time on the net they all talk about movie rating where userId, rating, title is used. The problem I only have one column document how can I achieve this in DNN?
To be able to compare strings / Words or documents the data needs to be converted to a format the computer understand, vectors.
Google has a nice guide on Universal Sentence Encoder for sentence similarity that you can follow which explains how to generate a vector from the neural network that they have already trained.
What they do and what you can try is to use cosine similarity to compare the vectors. Compare one sentence vector with all other vectors and find the closest.
I am adding Annoy here, because I find it quite intuitive to use and you can get the n closest items.