nlpatl.sampling.certainty.most_confidence

class nlpatl.sampling.certainty.most_confidence.MostConfidenceSampling(threshold=0.85, name='most_confidence_sampling')[source]

Bases: nlpatl.sampling.sampling.Sampling

Sampling data points if the confidence is higher than threshold. Refer to https://markcartwright.com/files/wang2019active.pdf

Parameters
  • threshold (float) – Minimum probability of model prediction. Default value is 0.85

  • 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='139640344534704'>) –

Returns

Tuple of target indices and sampling values

Return type

Tuple of numpy.ndarray, numpy.ndarray