class_docstr: Tool for building interaction and feature matrices, taking care of the
  mapping between user/item ids and feature names and internal feature indices.
  
  To create a dataset:
  - Create an instance of the `Dataset` class.
  - Call `fit` (or `fit_partial`), supplying user/item ids and feature names
    that you want to use in your model. This will create internal mappings that
    translate the ids and feature names to internal indices used by the LightFM
    model.
  - Call `build_interactions` with an iterable of (user id, item id) or (user id,
    item id, weight) to build an interactions and weights matrix.
  - Call `build_user/item_features` with iterables of (user/item id, [features])
    or (user/item id, {feature: feature weight}) to build feature matrices.
  - To add new user/item ids or features, call `fit_partial` again. You will need
    to resize your LightFM model to be able to use the new features.
  
  Parameters
  ----------
  
  user_identity_features: bool, optional
      Create a unique feature for every user in addition to other features.
      If true (default), a latent vector will be allocated for every user. This
      is a reasonable default for most applications, but should be set to false
      if there is very little data for every user. For more details see the Notes
      in :doc:`LightFM<lightfm>`.
  
  item_identity_features: bool, optional
      Create a unique feature for every item in addition to other features.
      If true (default), a latent vector will be allocated for every item. This
      is a reasonable default for most applications, but should be set to false
      if there is very little data for every item. For more details see the Notes
      in :doc:`LightFM<lightfm>`.
docstr: Build a item features matrix out of an iterable of the form
  (item id, [list of feature names]) or (item id, {feature name: feature weight}).
  
  Parameters
  ----------
  
  data: iterable of the form
      (item id, [list of feature names]) or (item id,
      {feature name: feature weight}).
      Item and feature ids will be translated to internal indices
      constructed during the fit call.
  normalize: bool, optional
      If true, will ensure that feature weights sum to 1 in every row.
  
  Returns
  -------
  
  feature matrix: CSR matrix (num items, num features)
      Matrix of item features.
docstr_tok: ["Build","a","item","features","matrix","out","of","an","iterable","of","the","form","(","item","id",",","[","list","of","feature","names","]",")","or","(","item","id",",","{","feature","name",":","feature","weight","}",")",".","Parameters","--","--","--","--","--","data",":","iterable","of","the","form","(","item","id",",","[","list","of","feature","names","]",")","or","(","item","id",",","{","feature","name",":","feature","weight","}",")",".","Item","and","feature","ids","will","be","translated","to","internal","indices","constructed","during","the","fit","call",".","normalize",":","bool",",","optional","If","true",",","will","ensure","that","feature","weights","sum","to","1","in","every","row",".","Returns","--","--","--","-","feature","matrix",":","CSR","matrix","(","num","items",",","num","features",")","Matrix","of","item","features","."]
code: def build_item_features(self, data, normalize=True):
      """
      Build a item features matrix out of an iterable of the form
      (item id, [list of feature names]) or (item id, {feature name: feature weight}).
  
      Parameters
      ----------
  
      data: iterable of the form
          (item id, [list of feature names]) or (item id,
          {feature name: feature weight}).
          Item and feature ids will be translated to internal indices
          constructed during the fit call.
      normalize: bool, optional
          If true, will ensure that feature weights sum to 1 in every row.
  
      Returns
      -------
  
      feature matrix: CSR matrix (num items, num features)
          Matrix of item features.
      """
  
      builder = _FeatureBuilder(
          self._item_id_mapping,
          self._item_feature_mapping,
          self._item_identity_features,
          normalize,
          "item",
      )
  
      return builder.build(data)
  
imports: import array
  import numpy
  import scipy.sparse
  import sklearn.preprocessing
label_desc: Use image node_id 11 for calling the Dataset obj's underlying member method code with example usage: obj.build_item_features(data, normalize) and returns: builder