nlpatl.sampling.uncertainty.entropy

class nlpatl.sampling.uncertainty.entropy.EntropySampling(name='entropy_sampling')[source]

Bases: nlpatl.sampling.sampling.Sampling

Sampling data points according to the entropy. Pick the highest N data points

Parameters

name (str) – Name of this sampling

sample(data, num_sample)[source]
Parameters
  • x – Values of determine the sampling

  • num_sample (int) – Total number of sample for labeling

  • data (<MagicMock id='139640343081264'>) –

Returns

Tuple of target indices and sampling values

Return type

Tuple of numpy.ndarray, numpy.ndarray