.. _l-methods: Methods ======= .. contents:: :local: :depth: 1 Summary +++++++ +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | method | class parent | truncated documentation | +==============================================================================================================================+=============================+====================================================================================================================================================================================+ | :py:meth:`__eq__ ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__hash__ ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__hash__ ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__hash__ ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | ParemetreCoutTrajet | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | ImageNearestNeighbors | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | MLStoragePerf2018 | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | MLStoragePerf2018Image | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | MLStoragePerf2018TimeSeries | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | ParemetreCoutTrajet | usuel | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_folder2matrix ` | ImageNearestNeighbors | Converts images stored in a folder into a matrix of features. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_get_transform ` | ImageNearestNeighbors | Returns the associated transform function with ``self.transform_``. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_imglist2matrix ` | ImageNearestNeighbors | Converts a list of images into a matrix of features. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_label_mapping ` | MLStoragePerf2018Image | Computes the label based on a subfolder name. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_label_mapping ` | MLStoragePerf2018TimeSeries | Computes the label based on a subfolder name. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_cached_performance ` | MLStoragePerf2018 | Retrieves performances already computed. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_cached_performance ` | MLStoragePerf2018Image | Retrieves performances already computed. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_cached_performance ` | MLStoragePerf2018TimeSeries | Retrieves performances already computed. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_ml_storage ` | MLStoragePerf2018 | Creates an instance of a `MLStorage `_ ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_ml_storage ` | MLStoragePerf2018Image | Creates an instance of a `MLStorage `_ ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_load_ml_storage ` | MLStoragePerf2018TimeSeries | Creates an instance of a `MLStorage `_ ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_private_kn ` | ImageNearestNeighbors | Commun private function to handle the same kind of inputs in all transform functions. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_save_performance ` | MLStoragePerf2018 | Saves cached performance. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_save_performance ` | MLStoragePerf2018Image | Saves cached performance. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_save_performance ` | MLStoragePerf2018TimeSeries | Saves cached performance. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_edge_to ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`adjust_charge ` | Blossom | Decides what is supposed to happen on charge adjusts and recurses. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`adjust_charge ` | Vertex | Decides what is supposed to happen on charge adjusts and recurses. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`alter_tree ` | Blossom | Detects and handles the four cases where trees need to be altered. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`alter_tree ` | Vertex | Detects and handles the four cases where trees need to be altered. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`attach_out_of_tree_pair ` | Blossom | Handles case (P2). | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`attach_out_of_tree_pair ` | Vertex | Handles case (P2). | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`augment_matching ` | Blossom | Augments the matching along the alternating path containing given edge. (P4) | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`augment_matching ` | Vertex | Augments the matching along the alternating path containing given edge. (P4) | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`calculate_charge ` | Edge | Calculates the total charge on this edge. The charge is calculated as the sum of all blossoms containing ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_perf ` | MLStoragePerf2018 | Computes the performances for every image and one particular model. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_perf ` | MLStoragePerf2018Image | Computes the performances for every image and one particular model. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_perf ` | MLStoragePerf2018TimeSeries | Computes the performances for every image and one particular model. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_performance ` | MLStoragePerf2018 | Computes the performance for the not cached one if *use_cache* is True. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_performance ` | MLStoragePerf2018Image | Computes the performance for the not cached one if *use_cache* is True. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`compute_performance ` | MLStoragePerf2018TimeSeries | Computes the performance for the not cached one if *use_cache* is True. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`cost ` | ParemetreCoutTrajet | Retourne un coût, plus il est bas, plus de déplacement est probable. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`detach_children ` | Blossom | Detaches all children and turns them into out-of-tree pairs. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`detach_children ` | Vertex | Detaches all children and turns them into out-of-tree pairs. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`detach_from_parent ` | Blossom | Detaches itself from the parent and forms an out-of-tree pair. If called on an odd blossom, edge needs to be None ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`detach_from_parent ` | Vertex | Detaches itself from the parent and forms an out-of-tree pair. If called on an odd blossom, edge needs to be None ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`expand ` | Blossom | Expands this blossom back into its constituents. (P1) | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`expand ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | ImageNearestNeighbors | Fits the model. *X* can be a folder. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`flip_alternating_path ` | Blossom | Flips edge selection on the alternating path from v1 to v2. v1 and v2 are the two vertices at the boundaries of ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`flip_alternating_path ` | Vertex | Flips edge selection on the alternating path from v1 to v2. v1 and v2 are the two vertices at the boundaries of ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`flip_root_path ` | Blossom | Flips edge selection on the alternating path from self to root. Argument edge is the edge from a child from which ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`flip_root_path ` | Vertex | Flips edge selection on the alternating path from self to root. Argument edge is the edge from a child from which ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_base_vertex ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_base_vertex ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_image_classes ` | ImageNearestNeighbors | Returns images classes for the given list of indices. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_image_names ` | ImageNearestNeighbors | Returns images names for the given list of indices. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_max_delta ` | Blossom | Finds the maximum allowed charge adjust for this blossom and its children. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_max_delta ` | Vertex | Finds the maximum allowed charge adjust for this blossom and its children. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_outermost_blossom ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_outermost_blossom ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_remaining_charge ` | Edge | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_root ` | Blossom | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_root ` | Vertex | | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`handle_tight_edges ` | Blossom | Finds any fresh tight edges. If a tight edge leads to an out-of-tree blossom, attach the pair (P2). ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`handle_tight_edges ` | Vertex | Finds any fresh tight edges. If a tight edge leads to an out-of-tree blossom, attach the pair (P2). ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`kneighbors ` | ImageNearestNeighbors | See :epkg:`NearestNeighbors`, method :epkg:`kneighbors`. Parameter *X* can be a file, the image is then loaded and ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`kneighbors_graph ` | ImageNearestNeighbors | See :epkg:`NearestNeighbors`, method :epkg:`kneighbors_graph`. Parameter *X* can be a file, the image is then loaded ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`plot_neighbors ` | ImageNearestNeighbors | Calls :epkg:`plot_gallery_images` with information on the neighbors. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`radius_neighbors ` | ImageNearestNeighbors | See :epkg:`NearestNeighbors`, method :epkg:`radius_neighbors`. Parameter *X* can be a file, the image is then loaded ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`shrink_with_peer ` | Blossom | Shrinks the cycle along given edge into a new blossom. (P3) | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`shrink_with_peer ` | Vertex | Shrinks the cycle along given edge into a new blossom. (P3) | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`toggle_selection ` | Edge | Toggles the membership of self in the current matching. | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`traverse_from ` | Edge | Returns the other endpoint of an edge. The argument can be either a vertex, a Blossom or a set of vertices. ... | +------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+