soft.fuzzy.logic.rules package

Subpackages

Submodules

soft.fuzzy.logic.rules.anchors module

Implements code to anchor granules in the KnowledgeBase class. This produces relevant attachment points in the KnowledgeBase.graph for fuzzy logic rules to be easily added by humans.

soft.fuzzy.logic.rules.anchors.anchor(granules: List[Type[ContinuousFuzzySet]], variable_offset: int = 0)

Anchor the list of ContinuousFuzzySet objects (i.e., make nodes that reference each set).

Parameters:
  • granules – A list of ContinuousFuzzySets; generates a list of nodes (i.e., anchors), implemented as tuples in the form (variable index, term index) in order for fuzzy logic rules to “attach” to, or reference the corresponding fuzzy sets within each ContinuousFuzzySet.

  • variable_offset – Begin counting from a different variable index other than zero. Default is zero.

Returns:

A list of nodes (i.e., anchors), implemented as tuples in the form (variable index, term index) in order for fuzzy logic rules to “attach” to, or reference the corresponding fuzzy sets within each ContinuousFuzzySet.

soft.fuzzy.logic.rules.criteria module

Module contents

This directory contains implementations for fuzzy logic rules, such as their creation or reduction.

class soft.fuzzy.logic.rules.LinguisticVariables(inputs, targets)

Bases: tuple

inputs

Alias for field number 0

targets

Alias for field number 1

class soft.fuzzy.logic.rules.Rule(premise, consequence, implication)

Bases: tuple

consequence

Alias for field number 1

implication

Alias for field number 2

premise

Alias for field number 0