PatternRecognizer class

Discovers recurring patterns in the concept stream.

Patterns are identified by:

  • Co-occurrence: Which concepts appear together frequently.
  • Sequence: Which concepts follow which in the observation stream.
  • Analogy: Which concepts have structurally similar neighbourhoods.

Constructors

PatternRecognizer({int minOccurrences = 2, double minConfidence = 0.4, ConsciousnessLogger? logger})

Properties

hashCode → int
The hash code for this object.
no setterinherited
minConfidence → double
final
minOccurrences → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

discover(Map<String, String> conceptLabels) → List<Pattern>
Discovers all patterns that exceed minOccurrences and minConfidence.
getAllPatterns() → List<Pattern>
Returns all discovered patterns sorted by confidence descending.
getMostFrequent(int n) → List<MapEntry<String, int>>
Returns the n most frequently occurring concepts.
getTopPatterns(int n) → List<Pattern>
Returns the top n most confident patterns.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(Concept concept) → void
Registers a new concept observation.
observeBatch(List<Concept> concepts) → void
Observes a batch of concepts (e.g. a full workspace snapshot).
predictNextConcept(String conceptId) → List<MapEntry<String, double>>
Predicts what concept is likely to follow conceptId based on observed sequences. Returns a list of (conceptId, confidence) pairs.
resetCounters() → void
Resets all counters (but not discovered patterns).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited