Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias identifier Import alias Import alias identifier Import alias FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword ListLoad Str Str Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad ListLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad keyword Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad BinOpMult NameLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr keyword Num Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr keyword Num Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareIn Call NameLoad NameLoad AttributeLoad NameLoad attr CompareIn Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad SubscriptLoad Call NameLoad NameLoad NameLoad Index Num attr Assign SubscriptStore NameLoad Index CompareLt NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr keyword Num Assign NameStore Dict Assign NameStore Dict Assign NameStore Num Assign NameStore Num Assign NameStore Num For TupleStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotIn TupleLoad NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call AttributeLoad BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad NameLoad Index NameLoad attr Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call AttributeLoad BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad NameLoad Index NameLoad attr If CompareNotEq SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Num body AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad If CompareNotEq SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Num body AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad AugAssignAdd NameStore Num Print TupleLoad NameLoad NameLoad Print TupleLoad BinOpDiv NameLoad NameLoad BinOpDiv NameLoad NameLoad Print NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad
N/A collections OrderedDict numpy.linalg lstsq sklearn.decomposition LatentDirichletAllocation sklearn.feature_extraction.text CountVectorizer N/A numpy np N/A os N/A pandas pd N/A plac main N/A N/A trace_fpath leaveout N/A 0.3 N/A N/A leaveout N/A float leaveout N/A df N/A N/A pd read_csv trace_fpath sep names N/A dt u s d N/A num_lines N/A len df N/A to N/A int N/A num_lines N/A num_lines leaveout N/A df_train N/A df N/A to N/A df_test N/A df N/A to N/A documents_train_right N/A OrderedDict N/A documents_train_left N/A OrderedDict N/A tokens_train N/A set N/A N/A _ u s d N/A df_train values N/A N/A u N/A str u N/A s N/A str s N/A d N/A str d N/A N/A u documents_train_right N/A N/A N/A documents_train_right N/A u N/A N/A N/A documents_train_left N/A u N/A N/A N/A N/A N/A documents_train_right N/A u append s N/A N/A N/A N/A documents_train_left N/A u append d N/A N/A N/A tokens_train add s N/A N/A N/A tokens_train add d N/A u documents_train_right N/A N/A N/A documents_train_right N/A u N/A N/A join N/A documents_train_right N/A u N/A N/A documents_train_left N/A u N/A N/A join N/A documents_train_left N/A u N/A vectorizer N/A CountVectorizer tokenizer N/A N/A N/A x N/A N/A N/A x split vocabulary tokens_train N/A X_train_counts N/A N/A vectorizer fit_transform N/A N/A documents_train_right values N/A Y_train_counts N/A N/A vectorizer transform N/A N/A documents_train_left values N/A lda_model N/A LatentDirichletAllocation n_topics 10 n_jobs -1 N/A N/A N/A lda_model fit X_train_counts N/A Theta_zh N/A N/A N/A lda_model transform X_train_counts T N/A ph N/A N/A X_train_counts sum axis 1 N/A pz N/A N/A N/A np asarray N/A N/A Theta_zh dot ph N/A N/A N/A 0 N/A Psi_oz N/A N/A lda_model components_ T N/A pz N/A pz N/A N/A pz sum N/A Psi_zo N/A N/A Psi_oz pz T N/A Psi_oz N/A Psi_oz N/A N/A Psi_oz sum axis 0 N/A Psi_zo N/A Psi_zo N/A N/A Psi_zo sum axis 0 N/A X_train_probs N/A N/A Y_train_probs N/A N/A N/A _ u s d N/A df_train values N/A N/A N/A N/A N/A str s N/A vectorizer vocabulary_ N/A N/A str d N/A vectorizer vocabulary_ N/A N/A id_s N/A N/A N/A vectorizer vocabulary_ get N/A str s N/A id_d N/A N/A N/A vectorizer vocabulary_ get N/A str d N/A N/A N/A X_train_probs append N/A Psi_zo N/A N/A N/A id_s N/A N/A N/A Y_train_probs append N/A Psi_zo N/A N/A N/A id_d N/A X_train_probs N/A N/A np array X_train_probs N/A Y_train_probs N/A N/A np array Y_train_probs N/A P_zz N/A N/A N/A lstsq X_train_probs Y_train_probs N/A 0 T N/A N/A P_zz N/A N/A P_zz 0 0 N/A I N/A N/A Psi_oz dot P_zz N/A I N/A I N/A N/A I sum axis 0 N/A probs_tmlda N/A N/A probs_lda N/A N/A ll_tmlda 0.0 N/A ll_lda 0.0 N/A n 0 N/A N/A _ u s d N/A df_test values N/A N/A u N/A str u N/A s N/A str s N/A d N/A str d N/A N/A N/A s N/A vectorizer vocabulary_ N/A d N/A vectorizer vocabulary_ N/A N/A id_s N/A N/A N/A vectorizer vocabulary_ get s N/A id_d N/A N/A N/A vectorizer vocabulary_ get d N/A N/A N/A id_d id_s probs_tmlda N/A N/A N/A probs_tmlda N/A N/A id_d id_s N/A N/A N/A N/A Psi_zo N/A N/A N/A id_s N/A I N/A id_s sum N/A N/A probs_lda N/A N/A id_d id_s N/A N/A N/A N/A Psi_zo N/A N/A N/A id_s N/A Psi_oz N/A id_s sum N/A N/A N/A probs_tmlda N/A N/A id_d id_s 0 N/A N/A ll_tmlda N/A N/A np log N/A probs_tmlda N/A N/A id_d id_s N/A N/A N/A probs_lda N/A N/A id_d id_s 0 N/A N/A ll_lda N/A N/A np log N/A probs_lda N/A N/A id_d id_s N/A n 1 N/A N/A ll_tmlda ll_lda N/A N/A N/A ll_tmlda n N/A ll_lda n N/A n N/A N/A N/A __name__ __main__ N/A N/A N/A N/A plac call main