Skip to content

Ex-Fuzzy 3.4.0

Choose a tag to compare

@Fuminides Fuminides released this 09 Nov 22:35
· 5 commits to main since this release

Ex-Fuzzy 3.4.0 adds mixture-of-rules inference to the genetic classifier, and fitting on training sets too large for memory.

pip install --upgrade ex-fuzzy

Before upgrading: the temporal module is removed, evalRuleBase no longer takes time_moments, and samples that fire no rule now take the most frequent training class, so seeded fits on data with uncovered samples change. See Removed and Changed below.

Added

  • Mixture of rules: BaseFuzzyRulesClassifier(inference='mixture') lets every rule that holds add its weights to every class (a multinomial logistic regression on the firing strengths, free or non-negative), instead of the single winning rule deciding. fit_mixture, mixture_scores, mixture_contributions and print_mixture work on fitted models. With mixture_search=True the genetic search scores candidates as mixtures and prunes rules by their role in the mixture (mixture_pruning, mixture_prune_threshold), so a rule that only suppresses a class is kept.
  • Training sets too large for memory: batch_size=n scores candidates n samples at a time with identical results.
  • Growing training subset: initial_data_fraction=x starts the search on part of the data and grows it.
  • Pattern stability: pattern_stabilizer.rule_set_stability and related functions (selection frequencies, Jaccard between rule sets, consensus rules).
  • Partitions from breakpoints: utils.construct_breakpoint_partition.
  • Regression: unique_antecedents=True drops rules that repeat the same antecedents.
  • Pruning tolerance is recorded in MasterRuleBase.pruning_tolerance.

Changed

  • Smaller fitted models: optimization_result_ no longer keeps the training samples.
  • Samples that fire no rule (with allow_unknown=False) are predicted as the most frequent training class, and no rule wins them.

Removed

  • Temporal fuzzy sets: the temporal module and its helpers in utils; evalRuleBase loses time_moments.

Fixed

  • explainable_predict and two term-gene issues of the genetic classifier with partitions of different sizes.

The full list is in the changelog.

PyPI: https://pypi.org/project/ex-fuzzy/3.4.0/