icecube.radcube.ml_tools.SingleChannelClassifier module¶
- class icecube.radcube.ml_tools.SingleChannelClassifier.SingleChannelClassifier(modelFile)¶
Bases:
object
Loads in trained model and has functions to return a classification score for a passed in waveform. The user is required to perform any preprocessing of the waveforms (e.g. upsampling, bandpassing) outside of a normalization. The models are trained on 4000 bins long waveform, so the input waveform sould also be 4000 bins long.
- Parameters:
modelFile (.h5) – Trained model file to be used to classify the waveforms
- ClassifyAntennaTimeSeries(ts)¶
- Parameters:
ts – an AntennaTimeSeries instance to be classified
- Returns:
the predicted value between (0-1) for the passed in time series
- ClassifyNumpyArray(array)¶
- Parameters:
array – numpy array that has shape (<N waveforms>,<waveform length>,1) and has been normalized to peak at +/-1
- Returns:
an array of prediction values