Module Expr Str ImportFrom alias Import alias identifier Assign NameStore Call NameLoad keyword Str keyword Str keyword Num keyword Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assert Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num keyword Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index NameLoad Slice Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword Num keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad Num Num NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore BinOpDiv NameLoad Num If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num attr attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad attr Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice BinOpDiv NameLoad Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Num Slice Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str orelse Assign NameStore BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num While CompareGt SubscriptLoad NameLoad Index Str BinOpMult Num Call AttributeLoad NameLoad attr NameLoad Num body AugAssignDiv SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad If BoolOpAnd NameLoad CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list
N/A N/A 
BarsViz.py

Visualization tools for toy bars data for topic models.
 matplotlib pylab N/A numpy np N/A imshowArgs N/A dict interpolation nearest cmap bone vmin 0.0 vmax 0.3 plotExampleBarsDocs N/A N/A Data docIDsToPlot vmax nDocToPlot doShowNow N/A None None 9 True N/A N/A N/A N/A pylab figure N/A V N/A Data vocab_size N/A sqrtV N/A int N/A N/A np sqrt V N/A N/A N/A np allclose N/A sqrtV sqrtV V N/A N/A docIDsToPlot None N/A N/A nDocToPlot N/A len docIDsToPlot N/A N/A docIDsToPlot N/A N/A N/A np random choice N/A Data nDoc size nDocToPlot replace False N/A nRows N/A N/A np floor N/A N/A np sqrt nDocToPlot N/A nCols N/A N/A np ceil N/A nDocToPlot nRows N/A N/A vmax None N/A N/A DocWordArr N/A N/A N/A N/A Data to_sparse_docword_matrix toarray N/A vmax N/A int N/A N/A np max N/A N/A np percentile DocWordArr 98 axis 0 N/A N/A plotPos docID N/A enumerate docIDsToPlot N/A N/A N/A start stop N/A N/A Data doc_range N/A N/A docID N/A N/A wIDs N/A N/A Data word_id N/A start stop N/A wCts N/A N/A Data word_count N/A start stop N/A docWordHist N/A N/A np zeros V N/A N/A docWordHist N/A wIDs wCts N/A squareIm N/A N/A np reshape docWordHist N/A N/A N/A np sqrt V N/A N/A np sqrt V N/A N/A N/A pylab subplot nRows nCols plotPos N/A N/A N/A pylab imshow squareIm interpolation nearest vmin 0 vmax vmax N/A doShowNow N/A N/A N/A N/A pylab show N/A plotBarsFromHModel N/A N/A hmodel Data doShowNow figH compsToHighlight sortBySize width height Ktop N/A None True None None False 12 3 None N/A N/A N/A Data None N/A N/A width N/A width 2 N/A N/A figH None N/A N/A figH N/A N/A pylab figure figsize N/A width height N/A N/A N/A N/A pylab axes figH N/A K N/A N/A hmodel allocModel K N/A VocabSize N/A N/A N/A N/A N/A hmodel obsModel comp N/A 0 lamvec size N/A learned_tw N/A N/A np zeros N/A K VocabSize N/A k N/A xrange K N/A N/A lamvec N/A N/A N/A N/A hmodel obsModel comp N/A k lamvec N/A N/A learned_tw N/A N/A k N/A N/A lamvec N/A N/A lamvec sum N/A sortBySize N/A N/A sortIDs N/A N/A N/A np argsort N/A N/A N/A hmodel allocModel Ebeta N/A -1 N/A -1 N/A sortIDs N/A sortIDs N/A Ktop N/A learned_tw N/A learned_tw N/A sortIDs N/A N/A N/A Data None N/A hasattr Data true_tw N/A N/A N/A N/A pylab subplot 121 N/A N/A N/A pylab imshow N/A Data true_tw imshowArgs N/A N/A N/A pylab colorbar N/A N/A N/A pylab title True Topic x Word N/A N/A N/A pylab subplot 122 N/A N/A N/A pylab imshow learned_tw imshowArgs N/A N/A N/A pylab title Learned Topic x Word N/A N/A aspectR N/A N/A N/A learned_tw shape N/A 1 N/A N/A learned_tw shape N/A 0 N/A N/A N/A imshowArgs N/A vmax N/A 2 N/A N/A np percentile learned_tw 97 N/A N/A N/A imshowArgs N/A vmax 5 N/A N/A N/A pylab imshow learned_tw aspect aspectR imshowArgs N/A N/A compsToHighlight None N/A N/A ks N/A N/A np asarray compsToHighlight N/A N/A N/A ks ndim 0 N/A N/A ks N/A N/A np asarray N/A ks N/A N/A N/A pylab yticks ks N/A N/A **** %d k N/A k ks N/A N/A doShowNow N/A figH None N/A N/A N/A N/A pylab show N/A