Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Note

The pickling-section may be a bit tricky so that I included simpler test scripts in this directory (pickle-test-scripts/) to check if your environment is set up correctly. Basically, it is just a trimmed-down version of the relevant sections from Ch08, including a very small movie_review_data subset.

Executing

python pickle-dump-test.py

will train a small classification model from the movie_data_small.csv and create the 2 pickle files

stopwords.pkl
classifier.pkl

Next, if you execute

python pickle-load-test.py

You should see the following 2 lines as output:

Prediction: positive
Probability: 85.71%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.