Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias Import alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num Assign NameStore Num Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Num keyword Num FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore NameLoad For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore BoolOpAnd NameLoad BoolOpOr CompareLtE Call AttributeLoad BinOpPow BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Num attr BinOpPow NameLoad Num CompareLtE Call AttributeLoad BinOpPow BinOpAdd SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Num attr BinOpPow NameLoad Num If UnaryOpNot NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad BinOpMult NameLoad Num BinOpMult NameLoad Num Assign SubscriptStore NameLoad ExtSlice Slice Num NameLoad Slice Num NameLoad BinOpAdd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign SubscriptStore NameLoad ExtSlice Slice NameLoad NameLoad Slice NameLoad NameLoad BinOpAdd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign SubscriptStore NameLoad Index TupleLoad Num BinOpAdd NameLoad Num Num Assign SubscriptStore NameLoad Index TupleLoad BinOpAdd NameLoad Num Num Num Assign SubscriptStore AttributeLoad NameLoad attr Slice BinOpAdd BinOpMult Num NameLoad Num Num Assign NameStore BinOpMult Num BinOpAdd NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword BinOpMult Num NameLoad Assign SubscriptStore NameLoad Slice Num NameLoad Num Assign NameStore Call NameLoad keyword Num keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr Num keyword Str Expr Call NameLoad Call NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults Num Num body Expr Str Assign NameStore Num Assign NameStore Call NameLoad keyword Num keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Dict Str Str Str Dict Str NameLoad Dict Str NameLoad Str Assign NameStore Call NameLoad keyword Num keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Dict Str NameLoad keyword Dict Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults Num body Expr Str Assign NameStore Num Assign NameStore Dict Str Str Str Str Dict Str NameLoad Dict Str NameLoad Str Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword Num keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword Num keyword Str keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults Num body Expr Str Assign NameStore Num Assign NameStore Dict Str Str Str Str Dict Str NameLoad Dict Str NameLoad Str Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword Num keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword Num keyword Str keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults Num body Expr Str Assign NameStore Call NameLoad keyword Num keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list
N/A nose.tools assert_true nose.tools assert_equal scipy.sparse csr_matrix scipy.sparse csc_matrix scipy.sparse isspmatrix N/A scipy.sparse sp N/A numpy np numpy.testing assert_array_almost_equal assert_allclose N/A warnings nose.tools assert_raises nose.plugins.skip SkipTest megaman.embedding.spectral_embedding SpectralEmbedding spectral_embedding _graph_is_connected N/A megaman.geometry.geometry geom sklearn.metrics normalized_mutual_info_score sklearn.datasets.samples_generator make_blobs N/A centers N/A N/A np array N/A N/A 0.0 5.0 0.0 0.0 0.0 N/A 0.0 0.0 4.0 0.0 0.0 N/A 1.0 0.0 0.0 5.0 1.0 N/A n_samples 1000 N/A N/A n_clusters n_features N/A centers shape N/A N/A S true_labels N/A make_blobs n_samples n_samples centers centers cluster_std 1.0 random_state 42 _check_with_col_sign_flipping N/A N/A A B tol N/A 0.0 N/A N/A  Check array A and B are equal with possible sign flipping on
    each columns N/A sign True N/A column_idx N/A range N/A N/A A shape N/A 1 N/A N/A sign N/A sign N/A N/A N/A N/A N/A N/A N/A A N/A N/A N/A column_idx N/A B N/A N/A N/A column_idx 2 mean N/A tol 2 N/A N/A N/A N/A N/A N/A A N/A N/A N/A column_idx N/A B N/A N/A N/A column_idx 2 mean N/A tol 2 N/A N/A sign N/A N/A False N/A True N/A test_spectral_embedding_two_components N/A N/A seed N/A 36 N/A N/A Test spectral embedding with two components N/A random_state N/A N/A N/A np random RandomState seed N/A n_sample 100 N/A affinity N/A N/A np zeros shape N/A N/A n_sample 2 N/A n_sample 2 N/A N/A affinity N/A N/A 0 n_sample N/A 0 n_sample N/A N/A N/A np abs N/A N/A random_state randn n_sample n_sample 2 N/A N/A affinity N/A N/A n_sample None N/A n_sample None N/A N/A N/A np abs N/A N/A random_state randn n_sample n_sample 2 N/A N/A affinity N/A N/A 0 N/A n_sample 1 1 N/A N/A affinity N/A N/A N/A n_sample 1 0 1 N/A N/A N/A affinity flat N/A N/A N/A 2 n_sample 1 0 N/A affinity N/A 0.5 N/A affinity N/A affinity T N/A true_label N/A N/A np zeros shape N/A 2 n_sample N/A N/A true_label N/A 0 n_sample 1 N/A se_precomp N/A SpectralEmbedding n_components 1 random_state N/A N/A N/A np random RandomState seed eigen_solver arpack N/A embedded_coordinate N/A N/A se_precomp fit_transform affinity input_type affinity N/A label_ N/A N/A np array N/A N/A N/A embedded_coordinate ravel 0 dtype float N/A N/A assert_equal N/A normalized_mutual_info_score true_label label_ 1.0 N/A test_spectral_embedding_precomputed_affinity N/A N/A seed almost_equal_decimals N/A 36 5 N/A N/A Test spectral embedding with precomputed kernel N/A radius 4.0 N/A se_precomp N/A SpectralEmbedding n_components 2 random_state N/A N/A N/A np random RandomState seed N/A geom_params N/A affinity_kwds adjacency_kwds adjacency_method N/A radius radius N/A radius radius brute N/A se_rbf N/A SpectralEmbedding n_components 2 random_state N/A N/A N/A np random RandomState seed geom geom_params N/A G N/A N/A geom Geometry adjacency_method brute adjacency_kwds N/A radius radius affinity_kwds N/A radius radius N/A N/A N/A G set_data_matrix S N/A A N/A N/A G compute_affinity_matrix N/A embed_precomp N/A N/A se_precomp fit_transform A input_type affinity N/A embed_rbf N/A N/A se_rbf fit_transform S input_type data N/A N/A assert_array_almost_equal N/A N/A N/A se_precomp affinity_matrix_ todense N/A N/A N/A se_rbf affinity_matrix_ todense almost_equal_decimals N/A N/A assert_true N/A _check_with_col_sign_flipping embed_precomp embed_rbf 0.05 N/A test_spectral_embedding_amg_solver N/A N/A seed N/A 20 N/A N/A Test spectral embedding with amg solver vs arpack using symmetric laplacian N/A radius 4.0 N/A geom_params N/A affinity_kwds adjacency_kwds adjacency_method laplacian_method N/A radius radius N/A radius radius brute symmetricnormalized N/A N/A N/A pyamg N/A N/A N/A ImportError N/A N/A N/A SkipTest pyamg not available. N/A se_amg N/A SpectralEmbedding n_components 2 eigen_solver amg random_state N/A N/A N/A np random RandomState seed geom geom_params N/A se_arpack N/A SpectralEmbedding n_components 2 eigen_solver arpack geom geom_params random_state N/A N/A N/A np random RandomState seed N/A embed_amg N/A N/A se_amg fit_transform S N/A embed_arpack N/A N/A se_arpack fit_transform S N/A N/A assert_true N/A _check_with_col_sign_flipping embed_amg embed_arpack 0.05 N/A test_spectral_embedding_symmetrzation N/A N/A seed N/A 36 N/A N/A Test spectral embedding with amg solver vs arpack using non symmetric laplacian N/A radius 4.0 N/A geom_params N/A affinity_kwds adjacency_kwds adjacency_method laplacian_method N/A radius radius N/A radius radius brute geometric N/A N/A N/A pyamg N/A N/A N/A ImportError N/A N/A N/A SkipTest pyamg not available. N/A se_amg N/A SpectralEmbedding n_components 2 eigen_solver amg random_state N/A N/A N/A np random RandomState seed geom geom_params N/A se_arpack N/A SpectralEmbedding n_components 2 eigen_solver arpack geom geom_params random_state N/A N/A N/A np random RandomState seed N/A embed_amg N/A N/A se_amg fit_transform S N/A embed_arpack N/A N/A se_arpack fit_transform S N/A N/A assert_true N/A _check_with_col_sign_flipping embed_amg embed_arpack 0.05 N/A test_spectral_embedding_unknown_eigensolver N/A N/A seed N/A 36 N/A N/A Test that SpectralClustering fails with an unknown eigensolver N/A se N/A SpectralEmbedding n_components 1 random_state N/A N/A N/A np random RandomState seed eigen_solver <unknown> N/A N/A assert_raises ValueError N/A se fit S N/A test_connectivity N/A N/A seed N/A 36 N/A N/A Test that graph connectivity test works as expected N/A graph N/A N/A np array N/A N/A 1 0 0 0 0 N/A 0 1 1 0 0 N/A 0 1 1 1 0 N/A 0 0 1 1 1 N/A 0 0 0 1 1 N/A N/A assert_equal N/A _graph_is_connected graph False N/A N/A assert_equal N/A _graph_is_connected N/A csr_matrix graph False N/A N/A assert_equal N/A _graph_is_connected N/A csc_matrix graph False N/A graph N/A N/A np array N/A N/A 1 1 0 0 0 N/A 1 1 1 0 0 N/A 0 1 1 1 0 N/A 0 0 1 1 1 N/A 0 0 0 1 1 N/A N/A assert_equal N/A _graph_is_connected graph True N/A N/A assert_equal N/A _graph_is_connected N/A csr_matrix graph True N/A N/A assert_equal N/A _graph_is_connected N/A csc_matrix graph True N/A