class_docstr: Factorization Machines base class.
docstr: One hot encodes string features considering them as categorical.
docstr_tok: ["One","hot","encodes","string","features","considering","them","as","categorical","."]
code: def _ohe_cat_features(self, x):
      """One hot encodes string features considering them as categorical."""
      return dict(
          (f"{j}_{xj}", 1) if isinstance(xj, str) else (j, xj)
          for j, xj in x.items()
      )
  
imports: from __future__ import annotations
  import abc
  import collections
  import numbers
  from collections.abc import Iterable
  import numpy
  from river import optim, utils
label_desc: Use image node_id 4 for calling the BaseFM obj's underlying member method code with example usage: obj._ohe_cat_features(x) and returns: dict