def __init__(self, experimentDir, label, inferenceType,<EOL>fields, metricNames=None, checkpointSource=None):
<EOL>self.__experimentDir = experimentDir<EOL>self.__inferenceType = inferenceType<EOL>self.__inputFieldsMeta = tuple(copy.deepcopy(fields))<EOL>self.__numInputFields = len(self.__inputFieldsMeta)<EOL>self.__label = label<EOL>if metricNames is not None:<EOL><INDENT>metricNames.sort()<EOL><DEDENT>self.__metricNames = metricNames<EOL>self.__outputFieldsMeta = []<EOL>self._rawInputNames = []<EOL>self.__datasetPath = None<EOL>self.__dataset = None<EOL>self.__checkpointCache = None<EOL>if checkpointSource is not None:<EOL><INDENT>checkpointSource.seek(<NUM_LIT:0>)<EOL>self.__checkpointCache = io.StringIO()<EOL>shutil.copyfileobj(checkpointSource, self.__checkpointCache)<EOL><DEDENT>return<EOL>
Constructor

        experimentDir:
                      experiment directory path that contains description.py

        label:        A label string to incorporate into the filename.


        inferenceElements:


        inferenceType:
                      An constant from opf_utils.InferenceType for the
                      requested prediction writer

        fields:       a non-empty sequence of nupic.data.fieldmeta.FieldMetaInfo
                      representing fields that will be emitted to this prediction
                      writer

        metricNames:  OPTIONAL - A list of metric names that well be emiited by this
                      prediction writer

        checkpointSource:
                      If not None, a File-like object containing the
                      previously-checkpointed predictions for setting the initial
                      contents of this PredictionOutputStream.  Will be copied
                      before returning, if needed.