CorySS2679 / Entity-Academy

Created for ENTITY Academy projects.
0 stars 0 forks source link

Figure out why last bit of code for spam filter tutorial didn't work. #12

Closed CorySS2679 closed 2 years ago

CorySS2679 commented 2 years ago

I went through the spam filter tutorial all the way, but the last step, calculating accuracy, didn't work. I got 0%, but should've gotten ~98%.

I need to troubleshoot and/or ask Dr. Mo if he'll look at it with me.

CorySS2679 commented 2 years ago

Figured it out! In the example code, there is a section that is used as a 'trial run' on a couple of faux emails. I had copied and pasted that code into the next section, with is for filtering the entire test dataset. The code did not use the same exact terms in the Label and Predicted columns, so when comparing the two columns, the result was always zero. Once I made the two columns match in capitalization and syntax, the accuracy calculation worked perfectly.