search_rankΒΆ

mlinsights.search_rank.SearchEngineVectors (self, pknn)

Implements a kind of local search engine which looks for similar results assuming they are vectors. The class is using sklearn.neighborsNearestNeighbors to find the nearest neighbors of a vector and follows the same API. The class populates members:

mlinsights.search_rank.SearchEnginePredictions (self, fct, fct_params = None, knn)

Extends class SearchEngineVectors by looking for neighbors to a vector X by looking neighbors to f(X) and not X. f can be any function which converts a vector into another one or a machine learned model. In that case, f will be set to a default behavior. See function model_featurizer.

mlinsights.search_rank.SearchEnginePredictionImages (self, fct, fct_params = None, knn)

Extends class SearchEnginePredictions. Vectors are coming from images. The metadata must contains information about path names. We assume all images can hold in memory. An example can found in notebook None or None. Another example can be found there: search_images_dogcat.py.