class_docstr: Sparse matrix where rows and columns are indexed using string.
  
  This matrix is used to store resutls of the competition evaluation.
class_docstr_tok: ["Sparse","matrix","where","rows","and","columns","are","indexed","using","string",".","This","matrix","is","used","to","store","resutls","of","the","competition","evaluation","."]
docstr: Saves matrix to the file.
  
  Args:
    filename: name of the file where to save matrix
    remap_dim0: dictionary with mapping row indices to row names which should
      be saved to file. If none then indices will be used as names.
    remap_dim1: dictionary with mapping column indices to column names which
      should be saved to file. If none then indices will be used as names.
docstr_tok: ["Saves","matrix","to","the","file",".","Args",":","filename",":","name","of","the","file","where","to","save","matrix","remap_dim0",":","dictionary","with","mapping","row","indices","to","row","names","which","should","be","saved","to","file",".","If","none","then","indices","will","be","used","as","names",".","remap_dim1",":","dictionary","with","mapping","column","indices","to","column","names","which","should","be","saved","to","file",".","If","none","then","indices","will","be","used","as","names","."]
code: def save_to_file(self, filename, remap_dim0=None, remap_dim1=None):
      """Saves matrix to the file.
  
      Args:
        filename: name of the file where to save matrix
        remap_dim0: dictionary with mapping row indices to row names which should
          be saved to file. If none then indices will be used as names.
        remap_dim1: dictionary with mapping column indices to column names which
          should be saved to file. If none then indices will be used as names.
      """
      # rows - first index
      # columns - second index
      with open(filename, "w") as fobj:
          columns = list(sorted(self._dim1))
          for col in columns:
              fobj.write(",")
              fobj.write(str(remap_dim1[col] if remap_dim1 else col))
          fobj.write("\n")
          for row in sorted(self._dim0):
              fobj.write(str(remap_dim0[row] if remap_dim0 else row))
              for col in columns:
                  fobj.write(",")
                  fobj.write(str(self[row, col]))
              fobj.write("\n")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import csv
  from io import BytesIO
  from io import StringIO
  import logging
  import os
  import pickle
  import time
  from six import iteritems
  from six import iterkeys
  from six import itervalues
  from six import PY3
label_desc: Use image node_id 6 for calling the ResultMatrix obj's underlying member method code with example usage: obj.save_to_file(filename, remap_dim0, remap_dim1) without return types