class_docstr: Code for reading current MovieLens data sets, including ML-20M, ML-Latest, and
  ML-Latest-Small.
  
  Parameters:
      path(str or pathlib.Path): Path to the directory containing the data set.
class_docstr_tok: ["Code","for","reading","current","MovieLens","data","sets",",","including","ML-20M",",","ML-Latest",",","and","ML-Latest-Small",".","Parameters",":","path","(","str","or","pathlib.Path",")",":","Path","to","the","directory","containing","the","data","set","."]
docstr: The tag genome table, recording inferred item-tag relevance scores.  This gets returned
  as a wide Pandas data frame, with rows indexed by item ID.
  
  >>> ml20m = MovieLens('data/ml-20m')
  >>> ml20m.tag_genome
  tag         007  007 (series)  18th century  ...     wwii   zombie  zombies
  item                                         ...
  1       0.02500       0.02500       0.05775  ...  0.03625  0.07775  0.02300
  2       0.03975       0.04375       0.03775  ...  0.01475  0.09025  0.01875
  3       0.04350       0.05475       0.02800  ...  0.01950  0.09700  0.01850
  4       0.03725       0.03950       0.03675  ...  0.01525  0.06450  0.01300
  5       0.04200       0.05275       0.05925  ...  0.01675  0.10750  0.01825
  ...
  [10381 rows x 1128 columns]
docstr_tok: ["The","tag","genome","table",",","recording","inferred","item-tag","relevance","scores",".","This","gets","returned","as","a","wide","Pandas","data","frame",",","with","rows","indexed","by","item","ID",".",">",">",">","ml20m","=","MovieLens","(","'data\/ml-20m","'",")",">",">",">","ml20m.tag_genome","tag","007","007","(","series",")","18th","century","...","wwii","zombie","zombies","item","...","1","0.02500","0.02500","0.05775","...","0.03625","0.07775","0.02300","2","0.03975","0.04375","0.03775","...","0.01475","0.09025","0.01875","3","0.04350","0.05475","0.02800","...","0.01950","0.09700","0.01850","4","0.03725","0.03950","0.03675","...","0.01525","0.06450","0.01300","5","0.04200","0.05275","0.05925","...","0.01675","0.10750","0.01825","...","[","10381","rows","x","1128","columns","]"]
code: def tag_genome(self):
      """
      The tag genome table, recording inferred item-tag relevance scores.  This gets returned
      as a wide Pandas data frame, with rows indexed by item ID.
  
      >>> ml20m = MovieLens('data/ml-20m')
      >>> ml20m.tag_genome
      tag         007  007 (series)  18th century  ...     wwii   zombie  zombies
      item                                         ...
      1       0.02500       0.02500       0.05775  ...  0.03625  0.07775  0.02300
      2       0.03975       0.04375       0.03775  ...  0.01475  0.09025  0.01875
      3       0.04350       0.05475       0.02800  ...  0.01950  0.09700  0.01850
      4       0.03725       0.03950       0.03675  ...  0.01525  0.06450  0.01300
      5       0.04200       0.05275       0.05925  ...  0.01675  0.10750  0.01825
      ...
      [10381 rows x 1128 columns]
      """
  
      fn = self.path / "genome-scores.csv"
      tags = pd.read_csv(self.path / "genome-tags.csv")
      tags = tags.set_index("tagId")
      tags = tags["tag"].astype("category")
      genome = pd.read_csv(
          fn,
          dtype={
              "movieId": np.int32,
              "tagId": np.int32,
              "relevance": np.float64,
          },
      )
      genome.rename(
          columns={"userId": "user", "movieId": "item"}, inplace=True
      )
      genome = genome.join(tags, on="tagId")
      genome = genome.pivot(
          index="item", columns="tag", values="relevance"
      )
      _log.debug(
          "loaded %s, takes %d bytes", fn, genome.memory_usage().sum()
      )
      return genome
  
imports: import os.path
  from pathlib import Path
  import logging
  import pandas
  import numpy
  from lenskit.util import cached
label_desc: Use image node_id 6 for calling the MovieLens obj's underlying member method code with example usage: obj.tag_genome() and returns: genome