Machine Learning Project to Predict Presidential Tweets

by Chuck Anderson, May 1, 2019


(What, why, very brief overview of methods and results.)

I'm very interested in the grammar, or lack thereof, used in tweets. I will try to automatically recognize presidential tweets by ....


Steps I took. Resources I used, such as code from the class, on-line resources, research articles, books [Goodfellow, et al., 2016], ....

Say in detail what each team member did.


Show all results. Intermediate results might be shown in above Methods section. Plots, tables, whatever.


What I learned. What was difficult. Changes I had to make to timeline.


  • [Goodfellow, et al., 2016] Ian Goodfellow and Yoshua Bengio and Aaron Courville, Deep Learning, MIT Press. 2014.

Your report for a single person team should contain approximately 2,000 to 5,000 words, in markdown cells. You can count words by running the following python code in your report directory. Projects with two people, for example, should contain 4,000 to 8,000 words.

In [6]:
import io
from IPython.nbformat import current
import glob
nbfile = glob.glob('Project Report Example.ipynb')
if len(nbfile) > 1:
    print('More than one ipynb file. Using the first one.  nbfile=', nbfile)
with[0], 'r', encoding='utf-8') as f:
    nb =, 'json')
word_count = 0
for cell in nb.worksheets[0].cells:
    if cell.cell_type == "markdown":
        word_count += len(cell['source'].replace('#', '').lstrip().split(' '))
print('Word count for file', nbfile[0], 'is', word_count)
Word count for file Project Report Example.ipynb is 163