Wiki / Lesson Thread: Lesson 10


Just posted the lesson video.

I am doing Quora insincere question challenge in kaggle. I created validation set from train-test-split size same as test set. My validation score is 90% while my submission is 52%. What’s going on?

Can someone please help me in using nbsvm++ for inference.I am able to train it but I am not able to get an inference at test time.How can I use this model for testing.

Did you do it using nbsvm++

Can you help me with inference step of nbsvm++ at test time.
I want to host it on a web app and make real time predictions.

I got an Error runnig the Code, so I post the solution for anyone facing the same issue:
When I run the Code:
trn,trn_y = texts_labels_from_folders(f’{PATH}train’,names)
I get the following Error:
UnicodeDecodeError: ‘charmap’ codec can’t decode byte X in position Y: character maps to undefined

Solution: (
You need to change the following file:
line 15;
texts.append(open(fname, ‘r’).read())
change to:
texts.append(open(fname, ‘r’, encoding=‘utf-8’).read())

Then everthing worked fine in my code.