Save Classifier with Pickle - Natural Language Processing With Python and NLTK p.14

Channel:
Subscribers:
1,410,000
Published on ● Video Link: https://www.youtube.com/watch?v=ReakZVh2Xwk



Duration: 6:18
54,999 views
427


As you will likely find with any form of data analysis, there is going to be some sort of processing bottleneck, that you repeat over and over, often yielding the same object in Python memory.

Examples of this might be loading a massive dataset into memory, some basic pre-processing of a static dataset, or, like in our case, the training of a classifier.

In our case, we spend much time on training our classifier, and soon we may add more. It is a wise choice to go ahead and pickle the trained classifer. This way, we can load in the trained classifier in a matter of milliseconds, rather than waiting 3-5+ minutes for the classifier to be trained.

To do this, we use the standard library's "pickle" module. What pickle does is serialize, or de-serialize, python objects. This could be lists, dictionaries, or even things like our trained classifier!

Playlist link: https://www.youtube.com/watch?v=FLZvOKSCkxY&list=PLQVvvaa0QuDf2JswnfiGkliBInZnIC4HL&index=1

sample code: http://pythonprogramming.net
http://hkinsley.com
https://twitter.com/sentdex
http://sentdex.com
http://seaofbtc.com




Other Videos By sentdex


2015-05-24Exec - Python programming tutorial
2015-05-23Python Eval programming tutorial
2015-05-22Python Pickle Module for saving objects (serialization)
2015-05-21Graphing Live Twitter Sentiment - Language Processing With Python and NLTK p.21
2015-05-20Twitter Sentiment Analysis - Natural Language Processing With Python and NLTK p.20
2015-05-19Sentiment Analysis Module - Natural Language Processing With Python and NLTK p.19
2015-05-18Better training data - Natural Language Processing With Python and NLTK p.18
2015-05-16Investigating Bias - Natural Language Processing With Python and NLTK p.17
2015-05-16Combining Algos with a Vote - Natural Language Processing With Python and NLTK p.16
2015-05-16Scikit-Learn incorporation - Natural Language Processing With Python and NLTK p.15
2015-05-15Save Classifier with Pickle - Natural Language Processing With Python and NLTK p.14
2015-05-14Naive Bayes - Natural Language Processing With Python and NLTK p.13
2015-05-13Words as Features for Learning - Natural Language Processing With Python and NLTK p.12
2015-05-12Text Classification - Natural Language Processing With Python and NLTK p.11
2015-05-11WordNet - Natural Language Processing With Python and NLTK p.10
2015-05-10NLTK Corpora - Natural Language Processing With Python and NLTK p.9
2015-05-07Named Entity Recognition - Natural Language Processing With Python and NLTK p.7
2015-05-07Lemmatizing - Natural Language Processing With Python and NLTK p.8
2015-05-06Chinking - Natural Language Processing With Python and NLTK p.6
2015-05-05Chunking - Natural Language Processing With Python and NLTK p.5
2015-05-04Part of Speech Tagging - Natural Language Processing With Python and NLTK p.4



Tags:
Natural Language Toolkit (Software)
Python (Programming Language)
Natural Language Processing (Software Genre)
Pickle
pickling
serializing
serialize
marshalling