actsnclass.run_loop

actsnclass.run_loop(args)

Command line interface to run the active learning loop.

Parameters:
  • -d (str) – Full path to output file to store diagnostics of each loop.
  • -i (str) – Complete path to input features file.
  • -n (int) – Number of active learning loops to run.
  • -q (str) – Full path to output file to store the queried sample.
  • -s (str) – Query strategy. Options are ‘UncSampling’ and ‘RandomSampling’.
  • -b (int (optional)) – Size of batch to be queried in each loop. Default is 1.
  • -c (str (optional)) – Machine Learning algorithm. Currently only ‘RandomForest’ is implemented.
  • -m (str (optional)) – Feature extraction method. Currently only ‘Bazin’ is implemented.
  • -t (str or int (optional)) – Choice of initial training sample. If ‘original’: begin from the train sample flagged in the file If int: choose the required number of samples at random, ensuring that at least half are SN Ia. Default is ‘original’.

Examples

Run directly from the command line:

>>> run_loop.py -i <input features file> -b <batch size> -n <number of loops>
>>>             -d <output diagnostic file> -q <output queried sample file>
>>>             -s <learning strategy> -t <choice of initial training>