class_docstr: Field-Weighted Factorization Machine base class.
class_docstr_tok: ["Field-Weighted","Factorization","Machine","base","class","."]
code: def _init_latents(self):
      random_latents = functools.partial(
          self.latent_initializer, shape=self.n_factors
      )
      return collections.defaultdict(random_latents)
  
imports: from __future__ import annotations
  import collections
  import functools
  import itertools
  import numpy
  from river import base, optim, utils
  from .base import BaseFM
label_desc: Use image node_id 2 for calling the FwFM obj's underlying member method code with example usage: obj._init_latents() and returns: collections