The Sdc2Scorer class

class ska_sdc.sdc2.sdc2_scorer.Sdc2Scorer(cat_sub, cat_truth)

The SDC2 scorer class.

Parameters:
  • cat_sub (pandas.DataFrame) – The submission catalogue.
  • cat_truth (pandas.DataFrame) – The truth catalogue.
classmethod from_txt(sub_path, truth_path, sub_skiprows=0, truth_skiprows=0)

Create an SDC2 scorer class from two source catalogues in text format.

The catalogues must have a header row of column names that matches the expected column names in the config file.

Parameters:
  • sub_path (str) – Path to the submission catalogue.
  • truth_path (str) – Path to the truth catalogue.
  • sub_skiprows (int, optional) – Number of rows to skip in submission catalogue. Defaults to 0.
  • truth_skiprows (int, optional) – Number of rows to skip in truth catalogue. Defaults to 0.
run(train=False, detail=False)

Run the scoring pipeline.

Returns:The calculated SDC2 score object
Return type:ska_sdc.sdc2.models.sdc2_score.Sdc2Score
score

Get the resulting Sdc2Score object.

Returns:The calculated SDC2 score object
Return type:ska_sdc.sdc2.models.sdc2_score.Sdc2Score