Skip to content

Class HTM::Models::NodeRelationship

Inherits Object
Defined in lib/htm/models/node_relationship.rb

NodeRelationship model - weighted directed edge between two nodes

Edges are stored in both directions so the CTE traversal only needs WHERE source_id IN (seeds) rather than an OR across both columns.

Weights are Jaccard similarity scores for tag_cooccurrence edges: weight = |tags(A) ∩ tags(B)| / |tags(A) ∪ tags(B)|

Constants

ORIGINS

Not documented.

REL_TYPES

Not documented.

Public Instance Methods

before_create()

Hooks

before_save()

Not documented.

validate()

Validations