Module Import alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias alias alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num ListLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Index ListLoad Num Num Slice NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Index ListLoad Num Num Slice NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad ListLoad Num ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num ListLoad Num Num Num Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword Num Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore Call NameLoad Call NameLoad Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num For NameStore Call NameLoad Num body Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num For NameStore Call NameLoad Num body Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Assert CompareEq NameLoad Num Return BinOpSub Num CompareEq SubscriptLoad NameLoad ExtSlice Slice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Slice Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr BinOpAdd Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpAdd Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad Num Assign AttributeStore NameLoad attr BinOpMult AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpMult Num Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assert Call NameLoad ListComp CompareLtELt Num NameLoad Call NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore NameLoad Assert Call NameLoad ListComp CompareEq Call AttributeLoad NameLoad attr NameLoad Num comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore NameLoad Assert Call NameLoad ListComp CompareEq Call AttributeLoad NameLoad attr NameLoad Num comprehension NameStore AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num Assign AttributeStore NameLoad attr BinOpMult BinOpMult Num AttributeLoad NameLoad attr CompareLt AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad ExtSlice Index Num Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad ExtSlice Index Num Slice Num Assign SubscriptStore NameLoad ExtSlice Slice Index ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad ExtSlice Index Num Slice Num Assign NameStore Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad ExtSlice Index Num Slice Num Assign SubscriptStore NameLoad ExtSlice Slice Index ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad Assert Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assert Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num ListLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num ListLoad Num Num Num Assert Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A N/A unittest N/A numpy np N/A scipy.sparse sp multimodal.lib.array_utils normalize_features multimodal.evaluation evaluate_label_reco evaluate_NN_label chose_examples TestLabelEvaluation N/A N/A unittest TestCase N/A test N/A N/A self N/A N/A N/A labels N/A 2 0 N/A reco N/A N/A np array N/A N/A 0.1 0.5 0.6 0.1 N/A 0.6 0.5 0.2 0.1 N/A good N/A evaluate_label_reco reco labels N/A N/A N/A self assertEqual good 1.0 N/A bad N/A evaluate_label_reco N/A reco N/A N/A N/A 1 0 N/A labels N/A N/A N/A self assertEqual bad 0.0 N/A medium N/A evaluate_label_reco N/A reco N/A N/A N/A 1 1 N/A labels N/A N/A N/A self assertEqual medium 0.5 N/A test_fails_on_multiple_labels N/A N/A self N/A N/A N/A labels N/A N/A 2 N/A 0 N/A reco N/A N/A np array N/A N/A 0.1 0.5 0.6 0.1 N/A 0.6 0.5 0.2 0.1 N/A N/A N/A self assertRaises AssertionError N/A N/A N/A evaluate_label_reco reco labels N/A N/A TestNNEvaluation N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self labels_a N/A N/A N/A np random randint 10 size 13 N/A N/A self labels_b N/A i N/A i N/A reversed N/A range 10 N/A N/A self a N/A N/A N/A np random random N/A 13 5 N/A i N/A range 13 N/A N/A N/A N/A self a N/A N/A i 2 N/A N/A self labels_a N/A i N/A N/A self b N/A N/A N/A np random random N/A 10 5 N/A i N/A range 10 N/A N/A N/A N/A self b N/A N/A i 3 N/A N/A self labels_b N/A i N/A fake_metrics N/A N/A self a b axis N/A -1 N/A N/A N/A axis -1 N/A N/A 1.0 N/A N/A a N/A N/A N/A N/A 2 N/A b N/A N/A N/A N/A 3 N/A test_good_on_fake_measure N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A evaluate_NN_label N/A self a N/A self b N/A self labels_a N/A self labels_b N/A self fake_metrics 1.0 N/A test_bad_on_fake_measure N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A evaluate_NN_label N/A self a N/A 1 N/A self b N/A self labels_a N/A self labels_b N/A self fake_metrics 0.0 N/A test_on_fake_measure_sparse N/A N/A self N/A N/A N/A a N/A N/A N/A N/A sp lil_matrix N/A self a tocsr N/A b N/A N/A N/A N/A sp lil_matrix N/A self b tocsr N/A N/A N/A self assertEqual N/A evaluate_NN_label a b N/A self labels_a N/A self labels_b N/A self fake_metrics 1.0 N/A N/A N/A self assertEqual N/A evaluate_NN_label a N/A 1 N/A self b N/A self labels_a N/A self labels_b N/A self fake_metrics 0.0 N/A N/A TestChoseExamples N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self label_set N/A list N/A range 3 N/A N/A self labels N/A N/A self label_set 5 N/A N/A N/A N/A np random seed 0 N/A N/A N/A N/A np random shuffle N/A self labels N/A test_choses_as_many_examples_as_labels N/A N/A self N/A N/A N/A r N/A chose_examples N/A self labels N/A self label_set N/A N/A N/A self assertEqual N/A len r N/A len N/A self label_set N/A r N/A chose_examples N/A self labels N/A N/A N/A self assertEqual N/A len r N/A len N/A self label_set N/A test_choses_twice_as_many_examples_as_labels N/A N/A self N/A N/A N/A r N/A chose_examples N/A self labels N/A self label_set number 2 N/A N/A N/A self assertEqual N/A len r N/A 2 N/A len N/A self label_set N/A test_all_chosen_are_indices N/A N/A self N/A N/A N/A r N/A chose_examples N/A self labels N/A self label_set number 2 N/A N/A all N/A N/A 0 i N/A len N/A self labels N/A i r N/A test_all_labels_are_chosen_once N/A N/A self N/A N/A N/A r N/A chose_examples N/A self labels N/A self label_set N/A lab N/A N/A N/A self labels N/A i N/A i r N/A N/A all N/A N/A N/A N/A lab count l 1 N/A l N/A self label_set N/A test_all_labels_are_chosen_twice N/A N/A self N/A N/A N/A r N/A chose_examples N/A self labels N/A self label_set number 2 N/A lab N/A N/A N/A self labels N/A i N/A i r N/A N/A all N/A N/A N/A N/A lab count l 2 N/A l N/A self label_set N/A N/A TestNormalizeFeatures N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self mat N/A N/A N/A np random random N/A 32 13 N/A N/A self mat N/A N/A 10.0 N/A self mat N/A N/A self mat 0.2 N/A test_on_sparse_same_shape N/A N/A self N/A N/A N/A m N/A self mat N/A N/A m N/A N/A 0 N/A 1 N/A m N/A N/A sp csc_matrix m N/A norm N/A normalize_features m N/A N/A N/A np allclose N/A N/A norm sum axis 0 1 N/A N/A N/A self assertEqual N/A norm shape N/A m shape N/A test_removes_columns_sparse N/A N/A self N/A N/A N/A m N/A self mat N/A N/A m N/A N/A 0 N/A 1 N/A N/A m N/A N/A N/A N/A 1 3 0 N/A m N/A N/A sp csc_matrix m N/A norm N/A normalize_features m N/A N/A N/A np allclose N/A N/A norm sum axis 0 1 N/A N/A N/A self assertEqual N/A norm shape N/A N/A N/A m shape N/A 0 N/A N/A N/A m shape N/A 1 2 N/A test_on_dense_same_shape N/A N/A self N/A N/A N/A m N/A self mat N/A N/A m N/A N/A 0 N/A 1 N/A norm N/A normalize_features m N/A N/A N/A np allclose N/A N/A norm sum axis 0 1 N/A N/A N/A self assertEqual N/A norm shape N/A m shape N/A test_removes_columns_dense N/A N/A self N/A N/A N/A m N/A self mat N/A N/A m N/A N/A 0 N/A 1 N/A N/A m N/A N/A N/A N/A 1 3 0 N/A norm N/A normalize_features m N/A N/A N/A np allclose N/A N/A norm sum axis 0 1 N/A N/A N/A self assertEqual N/A norm shape N/A N/A N/A m shape N/A 0 N/A N/A N/A m shape N/A 1 2 N/A test_same_on_dense_and_sparse N/A N/A self N/A N/A N/A m1 N/A N/A sp csc_matrix N/A self mat N/A m2 N/A N/A sp csr_matrix N/A self mat N/A n N/A normalize_features N/A self mat N/A n1 N/A normalize_features m1 N/A n2 N/A normalize_features m2 N/A N/A N/A np allclose N/A N/A n1 todense n N/A N/A N/A np allclose N/A N/A n2 todense n N/A test_does_not_modify N/A N/A self N/A N/A N/A m N/A N/A N/A self mat copy N/A N/A normalize_features m N/A ms N/A N/A sp csr_matrix m N/A N/A normalize_features ms N/A N/A N/A np allclose m N/A self mat N/A N/A N/A np allclose N/A N/A ms todense N/A self mat N/A test_OK N/A N/A self N/A N/A N/A n N/A normalize_features N/A N/A np array N/A N/A 1.0 0.0 1.5 0.1 N/A 1.0 0.0 0.5 0.3 N/A ok N/A N/A np array N/A N/A 0.5 0.75 0.25 N/A 0.5 0.25 0.75 N/A N/A N/A np allclose n ok N/A N/A