Downloaded ipynb file as python, to compare and contrast with a new copy I was created in former score.py script. Script creates classifier and exports to pickle.
Downloaded ipy notebook for logistic regression as python script, renamed to classifier.py.
Update flask server to look for model in politwit library
Broke up main() function into get_political_tweets and get_nonpolitical_tweets, called from main. Removed hashtag storage in database, because in this prototype I'm doing full-text analysis and dont need to store co-occuring hashtags in the hashtags table.
Created separate script for pickling co-occurring hashtags given starting political and nonpolitical hashtags.
Using hashtags.py, get co-occurring hashtags for tcot and p2, and add to list of political hashtags. Run seed_tweets to add tweets with these hashtags to database, changing the tweet ratio to about 50-50 political-nonpolitical.
Added co-occurring hashtag tweets to the database, changing ratio from 75-25 to 50-50 np-p tweets.

 - Using Naive Bayes, this ratio enabled classifier to score high on both precision and recall, though it tends to overclassify tweets as political.
Pickle files created from hashtags.py script, which pickles co-occurring hashtags and their count frequency. These hashtags used to add more diverse tweets to training set.
Change path to database in model to reflect that database is in parent directory.
Add docstrings and more semantic naming to hashtags.py

 - rename starting hashtags to SEED hashtags
 - add docstrings to functions, particularly load_hashtags
Update seed_tweets.py with extended lists of p and np hashtags, remove parameters no longer needed by moving hashtag collection to separate file.
Database with approx half political, half nonpoitical tweets. Predates the addition of co-occurring nonpolitical hashtags.
Most current db, still with approx 50-50 np-p tweets despite adding co-occurring nonpolitical tweets. 36,000 unique records.
Made backup copy of tweets database (with 36000 entries) before I erase database and re-seed
Saving version of database where data is divided 58-42 nonpolitical to political tweets.

This data ratio got the best performance with the Bernoulli Naive Bayes algorithm, which got 87% precision and 88% recall.
Deleted extra 20,000 political tweets from database, for a ratio of 72% nonpolitical to 28% political tweets.

Logistic regression gets 65% precision, 91% recall on this dataset when class weight is "auto." Otherwise, Bernoulli and LR perform about the same on this ratio of data. Underpredicts political tweets in my small sample.
Remove scratch directory from remote repo and git tracking.
Rename tweets.db to reflect ratios of 72-28 np-p, move hashtag pkl files into politwit dir.
Pickled classifiers from ipynb scripts moved from scratch dir to politwit for use in scoring.
Move hashtag pkl files to root directory.