skhubness.neighbors.LSH — scikit-hubness 0.21a1 documentation

# skhubness.neighbors.LSH

class `skhubness.neighbors.` `LSH`(n_candidates: int = 5, radius: float = 1.0, metric: str = 'euclidean', num_probes: int = 50, n_jobs: int = 1, verbose: int = 0)
  `__init__`(self, n_candidates: 'int' = 5, radius: 'float' = 1.0, metric: 'str' = 'euclidean', num_probes: 'int' = 50, n_jobs: 'int' = 1, verbose: 'int' = 0)

    Initialize self. See help(type(self)) for accurate signature.

  Methods

  `__init__`(self, n_candidates, radius, metric, …) | Initialize self.
  `fit`(self, X, y) | Setup the LSH index from training data.
  `kneighbors`(self, X, n_candidates, …) |
  `radius_neighbors`(self, X, radius, …) | TODO add docstring

  Attributes

  `valid_metrics` |

  `fit`(self, X: 'np.ndarray', y: 'np.ndarray' = None) → 'LSH'

    Setup the LSH index from training data.

  `radius_neighbors`(self, X: 'np.ndarray' = None, radius: 'float' = None, return_distance: 'bool' = True)

    TODO add docstring

    Notes

    From the falconn docs: radius can be negative, and for the distance function ‘negative_inner_product’ it actually makes sense.