.. _f-searchenginevectors: module ``search_rank.search_engine_vectors`` ============================================ .. inheritance-diagram:: mlinsights.search_rank.search_engine_vectors Short summary +++++++++++++ module ``mlinsights.search_rank.search_engine_vectors`` Implements a way to get close examples based on the output of a machine learned model. :githublink:`%|py|6` Classes +++++++ +-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=================================================================================================+======================================================================================================================+ | :class:`SearchEngineVectors ` | Implements a kind of local search engine which looks for similar results assuming they are vectors. The class is ... | +-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ | staticmethod | truncated documentation | +==============================================================================================+=======================================================================+ | :meth:`read_zip ` | Restore the features, the metadata to a :class:`SearchEngineVectors`. | +----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | method | truncated documentation | +=========================================================================================================+============================================================================================+ | :py:meth:`__init__ ` | | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`_first_pass ` | Finds the closest *n_neighbors*. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`_fit_knn ` | Fits the nearest neighbors. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`_is_iterable ` | Tells if an objet is an iterator or not. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`_prepare_fit ` | Stores data in the class itself. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :py:meth:`_second_pass ` | Reorders the closest *n_neighbors*. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :meth:`fit ` | Every vector comes with a list of metadata. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :meth:`kneighbors ` | Searches for neighbors close to *X*. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :meth:`to_zip ` | Saves the features and the metadata into a zipfile. The function does not save the *k-nn*. | +---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlinsights.search_rank.search_engine_vectors :members: :special-members: __init__ :show-inheritance: