In [2]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [3]:
from corpus import *
import pandas as pd
import seaborn as sns
def df_in(path):
    return pd.DataFrame([Json(file).dict() for file in Filter(Directory(path), '.txt')])

Alpha


In [17]:
df = df_in('runs-2017-09-29')
sns.regplot(x=df.doc_topic_prior, y=df.perplexity)


Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0x1c80372ae10>

Eta


In [8]:
df = df_in('runs-2017-10-03')
sns.regplot(x=df.topic_word_prior, y=df.perplexity)
print('TWP:', df[df.perplexity == df.perplexity.min()].topic_word_prior)
print('DTP:', df[df.perplexity == df.perplexity.min()].doc_topic_prior)


TWP: 98    0.375
Name: topic_word_prior, dtype: float64
DTP: 98    0.365
Name: doc_topic_prior, dtype: float64