Commit 73c2ca71 authored by mjennewine's avatar mjennewine
Browse files

Slight performance increase using one-hot

parent 8c431c32
Loading
Loading
Loading
Loading
(76.3 MiB)

File changed.

No diff preview for this file type.

(81.5 MiB)

File changed.

No diff preview for this file type.

−155 B (3.07 MiB)

File changed.

No diff preview for this file type.

(8.91 KiB)

File changed.

No diff preview for this file type.

+1 −2
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ def extract(message):
    #create list of words from text
    words = clean.split()
    
    """
    #one-hot
    #set feature value to 1 if word is found in text
    for i in range(len(features)):
@@ -112,7 +111,7 @@ def extract(message):
    #count occurrences of feature word in text
    for i in range(len(features)):
        vector[i] = words.count(features[i])
    
    """
    return vector


Loading