This script takes a supervised model and an input dataset and performs
a batch prediction with them. Then it generates a new dataset,
returned as the ouput corrected-predictions
that contains an
additional prediction column (named "corrected-prediction") which
coincides with the original prediction when it was made without any
missing inputs, but uses the fallback category given by the script
parameter denied-class
("denied" by default) otherwise. A second
dataset, filtered-predictions
, contains only those rows with
non-denied predictions.
One can also specify the list of fields that are checked, using
fields
. Other properties such as output column names are easily
parameterizable. Also, when the model is a regression, the additional
column will output string values: one could also introduce an
accepted-class
for those cases easily.