CausalInferenceEngine class

Detects and chains causal relationships between concepts.

How it works

  1. Pattern matching: Scans concept pairs for causal linguistic cues.
  2. Temporal ordering: Earlier events are candidates for causes.
  3. Chain building: Links individual cause–effect pairs into chains.
  4. Counterfactual check: Weak if the concepts co-occur rarely.

Constructors

CausalInferenceEngine({ConsciousnessLogger? logger})

Properties

hashCode → int
The hash code for this object.
no setterinherited
knownCausality → List<CausalRelationship>
All discovered causal relationships.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildCausalChain(String startConceptId, {int maxLength = 5}) → List<String>
Builds a causal chain from the knownCausality list, starting from startConceptId. Returns ordered concept IDs from cause to final effect.
describeCausality(List<String> conceptIds, Map<String, String> conceptLabels) → String
Generates a natural-language description of all known causal chains starting from any of conceptIds.
discoverFromConcepts(List<Concept> concepts) → List<CausalRelationship>
Scans all pairs in concepts and returns any causal relationships.
inferCausality(Concept cause, Concept effect) → CausalRelationship?
Analyses a pair of Concepts and returns a CausalRelationship if sufficient causal evidence is found, otherwise null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Clears the causal relationship store.
toString() → String
A string representation of this object.
inherited

Operators

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