class_docstr: A matrix that implements cosine distance search against it.
  
  cosine_distance = 1 - cosine_similarity
  
  Note: We want items that are more similar to be closer to zero so we are
  going to instead return 1 - cosine_similarity. We do this so similarity
  and distance metrics can be treated the same way.
class_docstr_tok: ["A","matrix","that","implements","cosine","distance","search","against","it",".","cosine_distance","=","1","-","cosine_similarity","Note",":","We","want","items","that","are","more","similar","to","be","closer","to","zero","so","we","are","going","to","instead","return","1","-","cosine_similarity",".","We","do","this","so","similarity","and","distance","metrics","can","be","treated","the","same","way","."]
docstr: Args:
      val: A list of features to be formatted.
  Returns:
      The transformed matrix.
code: def features_to_matrix(features):
      """
      Args:
          val: A list of features to be formatted.
      Returns:
          The transformed matrix.
      """
      return _np.array(features, ndmin=2)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import abc
  import numpy
  import scipy.sparse
  import scipy.spatial.distance
label_desc: Use image node_id 2 for calling the DenseCosineDistance obj's underlying member method code with example usage: obj.features_to_matrix(features) and returns: _np