CNG Method with Weighted Voting
Nick J. Cercone · 2004
CNG Method for Authorship Attribution. The Common N-Grams (CNG) classification method for authorship attribution (AATT) was described in [2]. The method is based on extracting the most frequent byte n-grams of size n from the training data. The n-grams are sorted by their normalized frequency, and the first L most-frequent n-grams define an author profile. Given a test document, the test profile in produced in the same way, and then the distances between the test profile and the author profiles are calculated. The test document is classified using k-nearest neighbours method with k = 1, i.e., the test document is attributed to the author whose profile is closest to the test profile. Given two profiles f1 and f2, which map n-grams from sets D1 and D2 to their respective frequencies, the distance measure between them is defined by the formula: X g2D1[D2 f1(g) f2(g) f1(g)+f2(g) 2 !2 = X g2D1[D2 2 · (f1(g) f2(g)) f1(g) + f2(g) 2