c3.libraries.sampling

Functions to select samples from a dataset by various criteria.

Module Contents

c3.libraries.sampling.sampling_reg_deco(func)[source]

Decorator for making registry of functions

c3.libraries.sampling.all(learn_from, batch_size)[source]

Return all points.

Parameters
  • learn_from (list) – List of data points

  • batch_size (int) – Number of points to select

Returns

All indeces.

Return type

list

c3.libraries.sampling.from_start(learn_from, batch_size)[source]

Select from the beginning.

Parameters
  • learn_from (list) – List of data points

  • batch_size (int) – Number of points to select

Returns

Selected indices.

Return type

list

c3.libraries.sampling.from_end(learn_from, batch_size)[source]

Select from the end.

Parameters
  • learn_from (list) – List of data points

  • batch_size (int) – Number of points to select

Returns

Selected indices.

Return type

list

c3.libraries.sampling.even(learn_from, batch_size)[source]

Select evenly distanced samples across the set.

Parameters
  • learn_from (list) – List of data points

  • batch_size (int) – Number of points to select

Returns

Selected indices.

Return type

list

c3.libraries.sampling.random_sample(learn_from, batch_size)[source]

Select randomly.

Parameters
  • learn_from (list) – List of data points.

  • batch_size (int) – Number of points to select.

Returns

Selected indices.

Return type

list

c3.libraries.sampling.high_std(learn_from, batch_size)[source]

Select points that have a high ratio of standard deviation to mean. Sampling from ORBIT data, points with a high std have the most coherent error, thus might be suitable for model learning. This has yet to be confirmed beyond anecdotal observation.

Parameters
  • learn_from (list) – List of data points.

  • batch_size (int) – Number of points to select.

Returns

Selected indices.

Return type

list

c3.libraries.sampling.even_fid(learn_from, batch_size)[source]

Select evenly among reached fidelities.

Parameters
  • learn_from (list) – List of data points.

  • batch_size (int) – Number of points to select.

Returns

Selected indices.

Return type

list