formula_spec_to_idinfo

hybrid_learning.experimentation.fuzzy_exp.fuzzy_exp_helpers.formula_spec_to_idinfo(formula_spec=None, formula_obj=None, fuzzy_logic_key=None, constants=None, predicate_setts=None, use_all_setts=False, maxlen=42, **_)[source]

Return a unique infos on the given formula_spec based on the formula, logic, and constants. The dir path is determined by the ID of the formula (see formula_spec_to_idinfo()), and the used fuzzy logic. The format of the folder name is: f"{f_id[:(maxlen-10)]}..{f_id_md5hash[:8]}/{fuzzy_logic_key}"

Parameters
  • formula_spec (Optional[Union[str, Merge]]) – formula object or string

  • fuzzy_logic_key (Optional[str]) – identifier for fuzzy logic; also used to parse formula_spec if that is a str

  • constants (Optional[Dict[str, Any]]) – key-value pairs of grounded variables

  • predicate_setts (Optional[Dict[str, Any]]) – collection of predicate settings of the format {pred_symbol: {init_key: init_val}}

  • use_all_setts (bool) – legacy setting to use all constants and predicate_setts entries without filtering

  • maxlen (int) – maximum total length of the string

  • formula_obj (Optional[Union[str, Merge]]) – alternative to setting formula_spec for compatibility

Return type

FormulaIDInfo