Module ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias alias ImportFrom alias alias FunctionDef arguments args defaults body Assign NameStore Call NameLoad keyword Num Expr Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore ListLoad Dict Str Str Str Str Num Num Dict Str Str Str Str Assign NameStore Call AttributeLoad Call NameLoad keyword Num attr NameLoad Assign NameStore GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Call NameLoad keyword Num keyword Str attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad ListLoad Str Str Str Call AttributeLoad Str attr Str ListLoad Call AttributeLoad Str attr Str Str Str For NameStore TupleLoad Num Num Num Num Num body Assign NameStore BinOpPow Num NameLoad Assign NameStore GeneratorExp NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad NameLoad Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num Expr Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num Expr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore ListLoad Dict Str Str Num Num Dict Str Str Str Num Num Num Assign NameStore Call NameLoad keyword Num keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Expr Call NameLoad ListLoad Num Num NameLoad Expr Call NameLoad ListLoad Num Num Num NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore ListLoad Dict Str Str Num Str Dict Str Str Str Str Num Num Assign NameStore Call NameLoad keyword Num keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Expr Call NameLoad ListLoad Num Num NameLoad Expr Call NameLoad ListLoad Num Num Num NameLoad Assign NameStore GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore ListLoad Dict Str Str Dict Str Str Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Expr Call NameLoad ListLoad Num NameLoad Expr Call NameLoad ListLoad Num NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore ListLoad ListLoad TupleLoad Call NameLoad Call NameLoad Num Assign NameStore Call NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad NameLoad NameLoad keyword Str Expr Call NameLoad NameLoad NameLoad keyword Num Expr Call NameLoad NameLoad NameLoad keyword Num Expr Call NameLoad NameLoad NameLoad keyword Str Assign NameStore Call NameLoad keyword Call AttributeLoad NameLoad attr BinOpPow Num Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr ListLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr ListLoad ListLoad Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr ListLoad ListLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call NameLoad attr ListLoad Dict Str Num Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num decorator_list
N/A __future__ unicode_literals N/A numpy np sklearn.feature_extraction FeatureHasher nose.tools assert_raises assert_true numpy.testing assert_array_equal assert_equal test_feature_hasher_dicts N/A N/A N/A N/A N/A h N/A FeatureHasher n_features 16 N/A N/A assert_equal dict N/A h input_type N/A raw_X N/A N/A foo dada tzara bar 42 37 N/A foo gaga baz string1 N/A X1 N/A N/A N/A FeatureHasher n_features 16 transform raw_X N/A gen N/A N/A iter N/A N/A d items N/A d raw_X N/A X2 N/A N/A N/A FeatureHasher n_features 16 input_type pair transform gen N/A N/A assert_array_equal N/A N/A X1 toarray N/A N/A X2 toarray N/A test_feature_hasher_strings N/A N/A N/A N/A N/A raw_X N/A N/A foo bar baz N/A N/A foo encode ascii N/A N/A N/A bar encode ascii baz quux N/A lg_n_features N/A 7 9 11 16 22 N/A N/A n_features N/A 2 lg_n_features N/A it N/A x N/A x raw_X N/A h N/A FeatureHasher n_features non_negative True input_type string N/A X N/A N/A h transform it N/A N/A assert_equal N/A N/A X shape N/A 0 N/A len raw_X N/A N/A assert_equal N/A N/A X shape N/A 1 n_features N/A N/A assert_true N/A N/A np all N/A N/A X data 0 N/A N/A assert_equal N/A N/A N/A X N/A 0 sum 4 N/A N/A assert_equal N/A N/A N/A X N/A 1 sum 3 N/A N/A assert_equal N/A X nnz 6 N/A test_feature_hasher_pairs N/A N/A N/A N/A N/A raw_X N/A N/A iter N/A N/A d items N/A d N/A N/A foo bar 1 2 N/A baz quux foo 3 4 -1 N/A h N/A FeatureHasher n_features 16 input_type pair N/A N/A x1 x2 N/A N/A N/A N/A h transform raw_X toarray N/A x1_nz N/A sorted N/A N/A np abs N/A x1 N/A N/A x1 0 N/A x2_nz N/A sorted N/A N/A np abs N/A x2 N/A N/A x2 0 N/A N/A assert_equal N/A 1 2 x1_nz N/A N/A assert_equal N/A 1 3 4 x2_nz N/A test_feature_hasher_pairs_with_string_values N/A N/A N/A N/A N/A raw_X N/A N/A iter N/A N/A d items N/A d N/A N/A foo bar 1 a N/A baz quux foo abc 4 -1 N/A h N/A FeatureHasher n_features 16 input_type pair N/A N/A x1 x2 N/A N/A N/A N/A h transform raw_X toarray N/A x1_nz N/A sorted N/A N/A np abs N/A x1 N/A N/A x1 0 N/A x2_nz N/A sorted N/A N/A np abs N/A x2 N/A N/A x2 0 N/A N/A assert_equal N/A 1 1 x1_nz N/A N/A assert_equal N/A 1 1 4 x2_nz N/A raw_X N/A N/A iter N/A N/A d items N/A d N/A N/A bax abc N/A bax abc N/A N/A x1 x2 N/A N/A N/A N/A h transform raw_X toarray N/A x1_nz N/A N/A np abs N/A x1 N/A N/A x1 0 N/A x2_nz N/A N/A np abs N/A x2 N/A N/A x2 0 N/A N/A assert_equal N/A 1 x1_nz N/A N/A assert_equal N/A 1 x2_nz N/A N/A assert_equal x1 x2 N/A test_hash_empty_input N/A N/A N/A N/A N/A n_features 16 N/A raw_X N/A N/A N/A N/A iter N/A range 0 N/A h N/A FeatureHasher n_features n_features input_type string N/A X N/A N/A h transform raw_X N/A N/A assert_array_equal N/A X A N/A N/A np zeros N/A N/A len raw_X n_features N/A test_hasher_invalid_input N/A N/A N/A N/A N/A N/A assert_raises ValueError FeatureHasher input_type gobbledygook N/A N/A assert_raises ValueError FeatureHasher n_features -1 N/A N/A assert_raises ValueError FeatureHasher n_features 0 N/A N/A assert_raises TypeError FeatureHasher n_features ham N/A h N/A FeatureHasher n_features N/A N/A np uint16 N/A 2 6 N/A N/A assert_raises ValueError N/A h transform N/A N/A N/A assert_raises Exception N/A h transform N/A N/A 5.5 N/A N/A assert_raises Exception N/A h transform N/A N/A None N/A test_hasher_set_params N/A N/A N/A N/A N/A hasher N/A FeatureHasher N/A N/A N/A hasher set_params n_features N/A np inf N/A N/A assert_raises TypeError N/A hasher fit N/A test_hasher_zeros N/A N/A N/A N/A N/A X N/A N/A N/A FeatureHasher transform N/A N/A foo 0 N/A N/A assert_equal N/A N/A X data shape N/A 0 N/A