Implementasi Similarity Machine sederhana menggunakan C# .NET

Ok bro, kali ini saya upload source code program sederhana untuk similarity machine 😀

Untuk teorinya tentang Similarity Machine bis dibaca : 😆

\text{similarity} = \cos(\theta) = {A \cdot B \over \|A\| \|B\|}.

Cosine similarity is a measure of similarity between two vectors of n dimensions by finding the cosine of the angle between them, often used to compare documents in text mining. Given two vectors of attributes, A and B, the cosine similarity, θ, is represented using a dot product and magnitude as

For text matching, the attribute vectors A and B are usually the term frequency vectors of the documents. The cosine similarity can be seen as a method of normalizing document length during comparison.

The resulting similarity ranges from −1 meaning exactly opposite, to 1 meaning exactly the same, with 0 indicating independence, and in-between values indicating intermediate similarity or dissimilarity.

In the case of information retrieval, the cosine similarity of two documents will range from 0 to 1, since the term frequencies (tf-idf weights) cannot be negative. The angle between two term frequency vectors cannot be greater than 90°.

Download source code nya disini  !!!! (Klik kanan save as)

Maaf maaf, saya belum sempat nulis penjelasan source code nya, belum sempat 😛

Leave a Reply

Your email address will not be published. Required fields are marked *