graphdot.model.active_learning.determinant_maximizer module

class graphdot.model.active_learning.determinant_maximizer.DeterminantMaximizer(kernel, kernel_options=None)[source]

Bases: object

Select a subset of a dataset such that the determinant of the kernel matrix of the selected samples are as large as possible. In other words, the objective here is to ensure that the samples are as linearly independent as possible in a reproducible kernel Hilbert space (RKHS).

Parameters:
  • kernel (callable or 'precomputed') – A symmetric positive semidefinite function implemented via the __call__ semantics. Alternatively, if the value is ‘precomputed’, a square kernel matrix will be expected as an argument to :py:`__call__`.
  • kernel_options (dict) – Additional arguments to be passed into the kernel.
__call__(X, n)[source]

Find a n-sample subset of X that attempts to maximize the diversity and return the indices of the samples.

Parameters:
  • X (feature matrix or list of objects) – Input dataset.
  • n (int) – Number of samples to be chosen.
Returns:

chosen – Indices of the samples that are chosen.

Return type:

list