Implementation edit

History edit

Pascal version in Skousen's green book Perl version C versions, x 2 or 3 Perl interface XS Foreign one Soar version (add link here)

Algorithm edit

Vocab: a subcontext is one node in the graph a supracontext is everything in a circle The computational implementation of the Analogical Modeling mechanism uses a boolean algebra, which is a distributive lattice. This lattice is called the supracontextual lattice. Each context is represented by a label composed of a vector of boolean values (0 or 1). Analogical modeling is a lazy classifier, like knn; nothing is computed until the instance to be classified is known. When an unclassified instance is fed to the AM classifier, the following steps take place: 1. All exemplars are assigned to a subcontext via a binary label 2. Each of the subcontexts are added to all subsuming supracontexts 3. Each supracontext is determined to be heterogeneous or homogeneous 4. Class probabilities for the given instance are calculated based on counts of pointers in the homogeneous contexts

Parallelism edit

To save memory and speed up processing, the supracontextual lattice can be split into several sublattices. After supracontexts are filled for each lattices, those are then combined to find the supracontextual space of the original lattice. In terms of memory, while a single lattice requires 2^n spaces, each of m sublattices would only require 2^n/m spaces, totaling m*2^n/m spaces, which is considerably smaller than 2^n. In terms of processing, time is saved because less memory must be filled, and less lattice math is done. The main disadvantage to this approach is that determining the heterogeneity of a supracontext must wait until the recombination of the sublattices.