Provides an implementation of McCarthy's amb operator with
binding forms and acceptance test operator.
Provides an implementation of McCarthy's `amb` operator with binding forms and acceptance test operator.
Constraints solving functions that operate on a Constraint Description which is a map describing a constraint description containing the mappings:
Constraints solving functions that operate on a Constraint Description which is a map describing a constraint description containing the mappings: - :variables -> seq of LVars - :formula -> list describing a predicate expression composed of a mix of the LVars in :variables and Clojure functions.
Most functions in rv work off of one or more of the following core concepts:
Entity: a hashmap with a :kb/id key mapped to a unique value and namespaced keys.
{:kb/id :person/john-doe :person/name "John Doe" :person/age 42}
Table: a set of hashmaps or Entities. Tables represent unstructured or semi-structured collections of data.
#{{:kb/id :city/blt :city/name "Baltimore"} {:kb/id :city/atl :city/name "Atlanta"}}
Fact: a vector triple in the form [entity-id attribute value] that describe that a given entity has an attribute with a specific value. You can tie facts together by referencing their :kb/ids.
[:person/john-doe :person/age 42] [:city/blt :city/name "Baltimore"]
Relation: a set of Facts pertaining to a particular Entity. You can tie facts together by referencing :kb/ids in value positions.
#{[:person/john-doe :person/age 42] [:city/blt :city/name "Baltimore"] [:person/john-doe :address/city :city/blt]}
LVar: a logic variable that can unify with any value in its :range
(map->LVar {:domain 'x :range (range 0 5)})
Ground: a concrete value, like a keyword, number, string, etc.
42, "John Doe", :city/blt
Query: a set of Facts containing a mix of LVars and Grounds used to find bindings for the LVars that satisfy a set of Facts.
Rules: a set of Facts describing derived or synthetic relations in terms of existing ones.
Production: a map containing :antecedent -> query and :consequent -> Facts to be asserted if the query fires.
KB: a set of Relations about many Entities and possibly containing Productions. It represents all the knowledge currently known or derivable.
Constraint Description: a set of LVars and a Formula describing the domain of their values.
Formula: a list describing a predicate expression of mixed LVars and clojure functions.
Most functions in rv work off of one or more of the following core
concepts:
Entity: a hashmap with a :kb/id key mapped to a unique value and namespaced keys.
{:kb/id :person/john-doe
:person/name "John Doe"
:person/age 42}
Table: a set of hashmaps or Entities. Tables represent unstructured or
semi-structured collections of data.
#{{:kb/id :city/blt :city/name "Baltimore"}
{:kb/id :city/atl :city/name "Atlanta"}}
Fact: a vector triple in the form [entity-id attribute value] that describe that
a given entity has an attribute with a specific value. You can tie facts together
by referencing their :kb/ids.
[:person/john-doe :person/age 42]
[:city/blt :city/name "Baltimore"]
Relation: a set of Facts pertaining to a particular Entity. You can tie facts
together by referencing :kb/ids in value positions.
#{[:person/john-doe :person/age 42]
[:city/blt :city/name "Baltimore"]
[:person/john-doe :address/city :city/blt]}
LVar: a logic variable that can unify with any value in its :range
(map->LVar {:domain 'x :range (range 0 5)})
Ground: a concrete value, like a keyword, number, string, etc.
42, "John Doe", :city/blt
Query: a set of Facts containing a mix of LVars and Grounds used to find
bindings for the LVars that satisfy a set of Facts.
Rules: a set of Facts describing derived or synthetic relations in terms of
existing ones.
Production: a map containing :antecedent -> query and :consequent -> Facts
to be asserted if the query fires.
KB: a set of Relations about many Entities and possibly containing Productions. It
represents all the knowledge currently known or derivable.
Constraint Description: a set of LVars and a Formula describing the domain
of their values.
Formula: a list describing a predicate expression of mixed LVars and clojure functions.A minimal implementation of Datalog.
A minimal implementation of Datalog.
I came across the Soundex algorithm when researching the retro KAMAS outlining application. Soundex is a phonetic algorithm for indexing words by sound.
I came across the Soundex algorithm when researching the retro KAMAS outlining application. Soundex is a phonetic algorithm for indexing words by sound.
Provides internal unification functions. DO NOT USE THIS NS. There is no guarantee that it will remain stable or at all.
Provides internal unification functions. DO NOT USE THIS NS. There is no guarantee that it will remain stable or at all.
Common learning-related functions and protocols.
Common learning-related functions and protocols.
Version spaces are a binary classification, empirical learning algorithm.
The approach, as described in 'Version spaces: a candidate elimination approach
to rule learning' by Tom Mitchel (1977) takes training examples (currently
Tuples of a like-arity) and manages a 'version space'. A version space is a
map containing two 'boundaries' :S and :G. The :G boundary contains 'hypotheses'
corresponding to the most general versions of the training data that are consistent
and :S is the most specific versions. When a version space is presented with a new
example it runs a 'candidate elimination' algorithm to modify the boundaries :S
and :G accordingly. Examples can be marked as 'positive' examples, meaning
that they are preferred instances. Anything not marked as 'positive' are taken as
negative examples. Once trained, a version space can classify new examples as
::positive or ::negative. If new examples are not covered by the existing hypotheses
in either boundary then they are classified as ::ambiguous instead.
Version spaces are a binary classification, empirical learning algorithm. The approach, as described in 'Version spaces: a candidate elimination approach to rule learning' by Tom Mitchel (1977) takes training examples (currently Tuples of a like-arity) and manages a 'version space'. A version space is a map containing two 'boundaries' `:S` and `:G`. The `:G` boundary contains 'hypotheses' corresponding to the most general versions of the training data that are consistent and `:S` is the most specific versions. When a version space is presented with a new example it runs a 'candidate elimination' algorithm to modify the boundaries `:S` and `:G` accordingly. Examples can be marked as 'positive' examples, meaning that they are preferred instances. Anything not marked as 'positive' are taken as negative examples. Once trained, a version space can classify new examples as `::positive` or `::negative`. If new examples are not covered by the existing hypotheses in either boundary then they are classified as `::ambiguous` instead.
The simplest possible production rules system that uses a set of EAV tuples as its knowledge base.
The simplest possible production rules system that uses a set of EAV tuples as its knowledge base.
Common search-related functions and protocols.
Common search-related functions and protocols.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |