iit-cs429/main

Classify Takes 3-5 minutes to run

Closed this issue · 3 comments

My code is giving the correct output but takes 3-5 minutes to go through all the documents. Is this expected?

Please try to make it more efficient. Mine runs in ~2-3 seconds.
To help, you should only have to pass through the documents once during
training (to count all the token frequencies).
-Aron

On Mon, Mar 28, 2016 at 3:44 PM, jmwaks notifications@github.com wrote:

My code is giving the correct output but takes 3-5 minutes to go through
all the documents. Is this expected?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#148

Thanks. I will improve that.

Yes I had the same problem. Found 2 fixes:

  1. I iterated over train documents twice
  2. in train function I used spam_terms = collections.Counter(num_of_spams)