Module ImportFrom alias Import alias identifier Import alias identifier Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num NameLoad NameLoad Str Num Num body Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad NameLoad Expr Call NameLoad Str Assign NameStore Num For NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr AugAssignAdd NameStore NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad Assign NameStore DictComp NameLoad Num comprehension NameStore NameLoad For NameStore NameLoad body AugAssignAdd SubscriptStore NameLoad Index AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad BinOpMult Call NameLoad NameLoad NameLoad Assign NameStore Num For NameStore SubscriptLoad NameLoad Slice body If BoolOpOr CompareLt SubscriptLoad NameLoad Index NameLoad NameLoad CompareEq NameLoad Str CompareEq NameLoad Str CompareEq NameLoad Str body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore DictComp SubscriptLoad NameLoad Index NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad NameLoad Expr Call NameLoad Str Assign NameStore Num For NameStore NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad BinOpMod Str Call NameLoad ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body If CompareNotIn AttributeLoad NameLoad attr NameLoad body Continue Assign NameStore BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareEq NameLoad Num UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore DictComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore ListComp SubscriptLoad NameLoad Index BinOpAdd NameLoad Num comprehension NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad keyword TupleLoad Num NameLoad keyword NameLoad orelse Assign NameStore Call NameLoad keyword TupleLoad Num NameLoad keyword NameLoad keyword CompareEq NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num If CompareIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body With Call NameLoad NameLoad Str NameStore body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Str Call NameLoad NameLoad Str If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Num With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str If CompareLtE Call NameLoad NameLoad Num body Continue Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num If NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Return TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body If CompareEq Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return TupleLoad TupleLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad Str keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Str NameLoad Num body Assign NameStore BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareEq NameLoad Num body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Assign NameStore BinOpMod Str Call NameLoad NameLoad Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad orelse Expr Call NameLoad Str NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd Call NameLoad NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad Str Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd Call NameLoad NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad NameLoad body Assign TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num If NameLoad body Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore IfExp NameLoad ListLoad NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword IfExp NameLoad Num Num keyword NameLoad keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword IfExp NameLoad Num Num keyword NameLoad If NameLoad body Expr Call NameLoad Str SubscriptLoad NameLoad Index Num Expr Call NameLoad Str SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword IfExp NameLoad Num Num Return TupleLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Num keyword TupleLoad NameLoad NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call NameLoad Str NameLoad Expr Call NameLoad Str NameLoad Return SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num Num Num Num NameLoad Num NameLoad body Assign TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore NameLoad Assign NameStore Num Assign NameStore Num If NameLoad body Expr Call NameLoad Str Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad Call NameLoad NameLoad Str Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If NameLoad body Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword Str keyword Str keyword Num If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Num If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Num orelse Expr Call AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword IfExp NameLoad Num Num keyword NameLoad If NameLoad body Expr Call NameLoad Str SubscriptLoad NameLoad Index Num Expr Call NameLoad Str SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword IfExp NameLoad Num Num Return TupleLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list
N/A __future__ print_function N/A numpy np N/A pandas pd N/A os N/A time N/A pprint N/A cPickle keras.callbacks RemoteMonitor keras.preprocessing sequence keras.models Sequential keras.optimizers SGD Adam RMSprop keras.preprocessing.text Tokenizer keras.layers.embeddings Embedding keras.utils np_utils mboxConvert parseEmails getEmailStats mboxToBinaryCSV kerasPlotter Plotter keras.layers.embeddings Embedding keras.layers.convolutional Convolution1D MaxPooling1D keras.layers.recurrent LSTM GRU keras.layers.core Dense Dropout Activation Flatten sklearn.feature_extraction.text CountVectorizer TfidfVectorizer get_word_features N/A N/A emails verbose nb_words skip_top maxlen as_matrix matrix_type label_cutoff max_n N/A True 5000 0 None True count 0.01 1 N/A N/A N/A totalWordsCount fromCount domainCount labels N/A getEmailStats emails N/A verbose N/A N/A N/A print N/A Creating email dataset with labels %s  N/A str labels N/A N/A print Label word breakdown: N/A total 0 N/A label labels N/A N/A count N/A sum N/A N/A N/A totalWordsCount N/A label values N/A total count N/A N/A print N/A 	%s:%d N/A label count N/A N/A print N/A Total word count: %d total N/A labelCounts N/A label 0 N/A label labels N/A email emails N/A N/A N/A labelCounts N/A N/A email label 1 N/A cutoff N/A int N/A N/A len emails label_cutoff N/A removed 0 N/A label N/A labels N/A N/A N/A N/A N/A N/A labelCounts N/A label cutoff N/A label Important N/A label Unread N/A label Sent N/A N/A removed 1 N/A N/A N/A labels remove label N/A labelNums N/A N/A labels N/A i i N/A i N/A range N/A len labels N/A verbose N/A N/A N/A print N/A Found %d labels below count threshold of %d  N/A removed cutoff N/A verbose N/A N/A N/A print N/A Creating email dataset with labels %s  N/A str labels N/A N/A print Label email count breakdown: N/A total 0 N/A label labels N/A N/A N/A print N/A 	%s:%d N/A label N/A labelCounts N/A label N/A N/A print N/A Total emails: %d N/A sum N/A N/A labelCounts N/A label N/A label labels N/A texts N/A N/A emailLabels N/A N/A email emails N/A N/A N/A N/A email label labels N/A N/A N/A text N/A N/A N/A email sender N/A str N/A email subject N/A text N/A email fromDomain N/A text N/A email content N/A N/A N/A texts append N/A N/A N/A N/A text replace replace N/A N/A N/A emailLabels append N/A labelNums N/A N/A email label N/A emailLabels N/A N/A np array emailLabels N/A N/A N/A max_n 1 N/A as_matrix N/A N/A tokenizer N/A Tokenizer nb_words N/A N/A N/A tokenizer fit_on_texts texts N/A reverse_word_index N/A N/A N/A tokenizer word_index N/A word word N/A word N/A tokenizer word_index N/A word_list N/A N/A reverse_word_index N/A N/A i 1 N/A i N/A range nb_words N/A as_matrix N/A N/A feature_matrix N/A N/A tokenizer texts_to_matrix texts mode matrix_type N/A N/A feature_matrix emailLabels word_list labels N/A N/A sequences N/A N/A tokenizer texts_to_sequences texts N/A N/A sequences emailLabels word_list labels N/A N/A N/A matrix_type tfidf N/A N/A vectorizer N/A TfidfVectorizer ngram_range N/A 1 max_n max_features nb_words N/A N/A vectorizer N/A CounterVectorizer ngram_range N/A 1 max_n max_features nb_words binary N/A matrix_type binary N/A feature_matrix N/A N/A vectorizer fit_transform texts N/A word_list N/A N/A vectorizer get_feature_names N/A N/A feature_matrix emailLabels word_list labels N/A write_csv N/A N/A csvfile feature_matrix labels feature_names verbose N/A None True N/A N/A dataframe N/A N/A pd DataFrame data feature_matrix columns feature_names N/A N/A dataframe N/A label labels N/A N/A N/A dataframe to_csv csvfile N/A verbose N/A N/A N/A print N/A Wrote CSV with columns %s to %s N/A N/A str N/A dataframe columns csvfile N/A read_csv N/A N/A csvfile verbose N/A True N/A N/A dataframe N/A N/A pd read_csv csvfile header 0 N/A labels N/A N/A N/A dataframe N/A label tolist N/A verbose N/A N/A N/A print N/A Read CSV with columns %s N/A str N/A dataframe columns N/A N/A N/A dataframe drop label inplace True axis 1 N/A N/A Unnamed: 0 N/A dataframe columns N/A N/A N/A N/A dataframe drop Unnamed: 0 inplace True axis 1 N/A feature_matrix N/A N/A dataframe as_matrix N/A feature_names N/A dataframe columns N/A N/A feature_matrix labels feature_names N/A write_info N/A N/A txtfile label_names verbose N/A True N/A N/A N/A open txtfile w writeto N/A N/A N/A N/A writeto write N/A N/A , join label_names N/A read_info N/A N/A txtfile verbose N/A True N/A N/A N/A open txtfile r readfrom N/A N/A label_names N/A N/A N/A N/A readfrom readline split , N/A label_names N/A write_sequences N/A N/A txtfile sequences labels verbose N/A True N/A N/A N/A open txtfile w writeto N/A N/A N/A sequence label N/A zip sequences labels N/A N/A N/A N/A writeto write N/A N/A N/A N/A N/A , join N/A N/A str x N/A x sequence ;;; N/A str label N/A verbose N/A N/A N/A print N/A Wrote txt with %d lines N/A len sequences N/A read_sequences N/A N/A txtfile verbose N/A True N/A N/A sequences N/A N/A labels N/A N/A linesnum 0 N/A N/A open txtfile r readfrom N/A N/A line readfrom N/A N/A linesnum 1 N/A parts N/A N/A line split ;;; N/A split N/A N/A N/A parts N/A 0 split , N/A N/A N/A len split 1 N/A N/A N/A N/A N/A sequences append N/A N/A np asarray split N/A N/A N/A labels append N/A int N/A parts N/A 1 N/A verbose N/A N/A N/A print N/A Read txt with %d lines linesnum N/A N/A sequences labels N/A dataframe N/A N/A pd read_csv csvfile header 0 N/A labels N/A N/A N/A dataframe N/A label tolist N/A verbose N/A N/A N/A print N/A Read CSV with columns %s N/A str N/A dataframe columns N/A N/A N/A dataframe drop label inplace True axis 1 N/A feature_matrix N/A N/A dataframe as_matrix N/A N/A feature_matrix labels N/A make_dataset N/A N/A features labels num_labels test_split nb_words N/A 0.1 1000 N/A N/A N/A N/A type features list N/A N/A num_examples N/A len features N/A random_order N/A N/A N/A np random permutation num_examples N/A index_split N/A int N/A test_split num_examples N/A train_indices N/A random_order N/A index_split N/A test_indices N/A random_order N/A index_split N/A X_train N/A N/A features N/A i N/A i train_indices N/A X_test N/A N/A features N/A i N/A i test_indices N/A Y_train N/A N/A labels N/A i N/A i train_indices N/A Y_test N/A N/A labels N/A i N/A i test_indices N/A N/A num_examples N/A N/A features shape N/A 0 N/A random_order N/A N/A N/A np random permutation num_examples N/A index_split N/A int N/A test_split num_examples N/A train_indices N/A random_order N/A index_split N/A test_indices N/A random_order N/A index_split N/A X_train N/A features N/A train_indices N/A X_test N/A features N/A test_indices N/A Y_train N/A N/A labels N/A i N/A i train_indices N/A Y_test N/A N/A labels N/A i N/A i test_indices N/A Y_train_c N/A N/A np_utils to_categorical Y_train num_labels N/A Y_test_c N/A N/A np_utils to_categorical Y_test num_labels N/A N/A N/A N/A X_train Y_train_c N/A X_test Y_test_c Y_train Y_test N/A get_emails N/A N/A verbose N/A True N/A N/A picklefile pickled_emails.pickle N/A N/A N/A N/A os path isfile picklefile N/A N/A N/A open picklefile r load_from N/A N/A emails N/A N/A cPickle load load_from N/A N/A emails N/A parseEmails . printInfo verbose N/A N/A open picklefile w store_to N/A N/A N/A N/A cPickle dump emails store_to N/A emails N/A get_ngram_data N/A N/A num_words matrix_type verbose max_n N/A 1000 binary True 1 N/A N/A csvfile N/A keras_data_%d_%s.csv N/A num_words N/A str matrix_type N/A infofile data_info.txt N/A N/A N/A N/A os path isfile csvfile N/A N/A N/A features labels feature_names N/A read_csv csvfile verbose verbose N/A label_names N/A read_info infofile N/A N/A emails N/A get_emails verbose verbose N/A N/A features labels feature_names label_names N/A get_word_features emails nb_words num_words matrix_type matrix_type verbose verbose max_n max_n N/A N/A max_n 1 N/A N/A N/A write_csv csvfile features labels feature_names verbose verbose N/A N/A write_info infofile label_names N/A N/A features labels feature_names label_names N/A get_my_data N/A N/A per_label N/A False N/A N/A csvfile N/A my_data_%s.csv N/A str per_label N/A infofile data_info.txt N/A N/A N/A N/A os path isfile csvfile N/A N/A N/A features labels feature_names N/A read_csv csvfile N/A label_names N/A read_info infofile N/A N/A N/A mboxToBinaryCSV . csvfile perLabel per_label N/A N/A features labels feature_names N/A read_csv csvfile N/A label_names N/A list N/A set labels N/A N/A write_info infofile label_names N/A num_labels N/A N/A max labels 1 N/A N/A features labels feature_names label_names N/A get_sequence_data N/A N/A N/A N/A N/A txtfile sequence_data.txt N/A infofile data_info.txt N/A N/A N/A N/A os path isfile txtfile N/A N/A N/A features labels N/A read_sequences txtfile N/A label_names N/A read_info infofile N/A N/A emails N/A parseEmails . N/A N/A features labels words labelVals N/A get_keras_features emails as_matrix False N/A N/A write_sequences txtfile features labels N/A N/A write_info infofile labelVals N/A num_labels N/A N/A max labels 1 N/A N/A features labels label_names N/A evaluate_mlp_model N/A N/A dataset num_classes extra_layers num_hidden dropout graph_to verbose N/A 0 512 0.5 None True N/A N/A N/A N/A X_train Y_train N/A X_test Y_test dataset N/A batch_size 32 N/A nb_epoch 5 N/A max_features 20000 N/A maxlen 125 N/A verbose N/A N/A N/A print N/A len X_train train sequences N/A N/A print N/A len X_test test sequences N/A N/A print X_train shape: N/A X_train shape N/A N/A print X_test shape: N/A X_test shape N/A N/A print Y_train shape: N/A Y_train shape N/A N/A print Y_test shape: N/A Y_test shape N/A N/A print Building model... N/A model N/A Sequential N/A N/A N/A model add N/A Dense num_hidden N/A N/A N/A model add N/A Activation relu N/A N/A N/A model add N/A Dropout dropout N/A i N/A range extra_layers N/A N/A N/A N/A model add N/A Dense num_hidden N/A N/A N/A model add N/A Activation relu N/A N/A N/A model add N/A Dropout dropout N/A N/A N/A model add N/A Dense num_classes N/A N/A N/A model add N/A Activation softmax N/A N/A N/A model compile loss categorical_crossentropy optimizer adam N/A plotter N/A Plotter save_to_filepath graph_to show_plot_window True N/A callbacks N/A graph_to N/A plotter N/A N/A history N/A N/A model fit X_train Y_train nb_epoch nb_epoch batch_size batch_size verbose N/A verbose 1 0 show_accuracy True validation_split 0.1 callbacks callbacks N/A score N/A N/A model evaluate X_test Y_test batch_size batch_size verbose N/A verbose 1 0 show_accuracy True N/A verbose N/A N/A N/A print Test score: N/A score N/A 0 N/A N/A print Test accuracy: N/A score N/A 1 N/A predictions N/A N/A model predict_classes X_test verbose N/A verbose 1 0 N/A N/A predictions N/A score N/A 1 N/A evaluate_recurrent_model N/A N/A dataset num_classes N/A N/A N/A N/A N/A X_train Y_train N/A X_test Y_test dataset N/A max_features 20000 N/A maxlen 125 N/A batch_size 32 N/A N/A print N/A len X_train train sequences N/A N/A print N/A len X_test test sequences N/A N/A print N/A Pad sequences (samples x time) with maxlen %d maxlen N/A X_train N/A N/A sequence pad_sequences X_train maxlen maxlen N/A X_test N/A N/A sequence pad_sequences X_test maxlen maxlen N/A N/A print X_train shape: N/A X_train shape N/A N/A print X_test shape: N/A X_test shape N/A N/A print Build model... N/A model N/A Sequential N/A N/A N/A model add N/A Embedding max_features 128 input_length maxlen N/A N/A N/A model add N/A GRU 512 N/A N/A N/A model add N/A Dropout 0.5 N/A N/A N/A model add N/A Dense num_classes N/A N/A N/A model add N/A Activation softmax N/A N/A N/A model compile loss categorical_crossentropy optimizer adam N/A N/A print Train... N/A N/A N/A model fit X_train Y_train batch_size batch_size nb_epoch 15 validation_data N/A X_test Y_test show_accuracy True N/A N/A score acc N/A N/A model evaluate X_test Y_test batch_size batch_size show_accuracy True N/A verbose N/A N/A N/A print Test score: score N/A N/A print Test accuracy: acc N/A N/A score N/A 1 N/A evaluate_conv_model N/A N/A dataset num_classes maxlen embedding_dims max_features nb_filter filter_length num_hidden dropout verbose pool_length with_lstm N/A 125 250 5000 300 3 250 0.25 True 2 False N/A N/A N/A N/A X_train Y_train N/A X_test Y_test dataset N/A batch_size 32 N/A nb_epoch 5 N/A verbose N/A N/A N/A print Loading data... N/A N/A print N/A len X_train train sequences N/A N/A print N/A len X_test test sequences N/A N/A print Pad sequences (samples x time) N/A X_train N/A N/A sequence pad_sequences X_train maxlen maxlen N/A X_test N/A N/A sequence pad_sequences X_test maxlen maxlen N/A verbose N/A N/A N/A print X_train shape: N/A X_train shape N/A N/A print X_test shape: N/A X_test shape N/A N/A print Build model... N/A model N/A Sequential N/A N/A N/A model add N/A Embedding max_features embedding_dims input_length maxlen N/A N/A N/A model add N/A Dropout dropout N/A N/A N/A model add N/A Convolution1D nb_filter nb_filter filter_length filter_length border_mode valid activation relu subsample_length 1 N/A pool_length N/A N/A N/A N/A model add N/A MaxPooling1D pool_length 2 N/A with_lstm N/A N/A N/A N/A model add N/A LSTM 125 N/A N/A N/A N/A model add N/A Flatten N/A N/A N/A model add N/A Dense num_hidden N/A N/A N/A model add N/A Activation relu N/A N/A N/A model add N/A Dropout dropout N/A N/A N/A model add N/A Dense num_classes N/A N/A N/A model add N/A Activation softmax N/A N/A N/A model compile loss categorical_crossentropy optimizer adam N/A N/A N/A model fit X_train Y_train batch_size batch_size nb_epoch nb_epoch show_accuracy True validation_split 0.1 N/A score N/A N/A model evaluate X_test Y_test batch_size batch_size verbose N/A verbose 1 0 show_accuracy True N/A verbose N/A N/A N/A print Test score: N/A score N/A 0 N/A N/A print Test accuracy: N/A score N/A 1 N/A predictions N/A N/A model predict_classes X_test verbose N/A verbose 1 0 N/A N/A predictions N/A score N/A 1 N/A