class_docstr: Selects instances by constructing a greedy coreset [SS17]_ over document embeddings.
      
class_docstr_tok: ["Selects","instances","by","constructing","a","greedy","coreset","[","SS17","]","_","over","document","embeddings","."]
code: def sample(
      self,
      clf,
      dataset,
      indices_unlabeled,
      indices_labeled,
      y,
      n,
      embeddings,
      embeddings_proba=None,
  ):
      if self.normalize:
          from sklearn.preprocessing import normalize
  
          embeddings = normalize(embeddings, axis=1)
      return greedy_coreset(
          embeddings,
          indices_unlabeled,
          indices_labeled,
          n,
          distance_metric=self.distance_metric,
          normalized=self.normalize,
      )
  
file_path: small-text/small_text/query_strategies/coresets.py
imports: import warnings
  import numpy
  from sklearn.metrics import pairwise_distances
  from small_text.query_strategies.strategies import EmbeddingBasedQueryStrategy
label_desc: Use image node_id 2 for calling the GreedyCoreset obj's underlying member method code with example usage: obj.sample(clf, dataset, indices_unlabeled, indices_labeled, y, n, embeddings, embeddings_proba) and returns: greedy_coreset