src.inout.predictions_writer
Classes
|
- class src.inout.predictions_writer.PredictionsWriter(path=None)
- Author:
Alberto M. Esmoris Pena
Class for writing predictions (mostly to be used in pipelines).
See
Writer.- static extract_writer_args(spec)
Extract the arguments to initialize/instantiate a PredictionsWriter from a key-word specification.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a PredictionsWriter.
- __init__(path=None)
Initialize/instantiate a PredictionsWriter.
See
Writerandwriter.Writer.__init__().
- write(preds, prefix=None, info=True)
Write the given predictions.
- Parameters:
preds (
np.ndarray) – The predictions to be written.prefix (str) – If None, the writing applies to path. If not None, the writing applies to prefix+path.
info (bool) – Whether to log an info message (True) or not (False).