actsnclass.learn_loop

actsnclass.learn_loop(nloops: int, strategy: str, path_to_features: str, output_metrics_file: str, output_queried_file: str, features_method='Bazin', classifier='RandomForest', training='original', batch=1, screen=True)

Perform the active learning loop. All results are saved to file.

Parameters:
  • nloops (int) – Number of active learning loops to run.
  • strategy (str) – Query strategy. Options are ‘UncSampling’ and ‘RandomSampling’.
  • path_to_features (str) – Complete path to input features file.
  • output_metrics_file (str) – Full path to output file to store metric values of each loop.
  • output_queried_file (str) – Full path to output file to store the queried sample.
  • features_method (str (optional)) – Feature extraction method. Currently only ‘Bazin’ is implemented.
  • classifier (str (optional)) – Machine Learning algorithm. Currently only ‘RandomForest’ is implemented.
  • training (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’.
  • batch (int (optional)) – Size of batch to be queried in each loop. Default is 1.
  • screen (bool (optional)) – If True, print on screen number of light curves processed.