Package weka.classifiers.lazy.AM.lattice
Class JohnsenJohanssonLattice
- java.lang.Object
-
- weka.classifiers.lazy.AM.lattice.JohnsenJohanssonLattice
-
- All Implemented Interfaces:
Lattice
public class JohnsenJohanssonLattice extends java.lang.Object implements Lattice
The approximation algorithm from "Efficient Modeling of Analogy", Johnsen and Johansson, DOI 10.1007/978-3-540-30586-6_77. Terminology from the paper is as follows:- $p$: the subcontext whose count is being approximated
- $size(p)$: the size of the subcontext $p$; or, the number of 0's in its label
- $\mathcal{H}(p)$: the sets found by intersecting $p$ with any subcontext that has a different outcome; the labels of such intersections
- $max(p)$: the cardinality of the union of all $x\in\mathcal{H}(p)$; the number of 0's in the union of the labels of all subcontexts in $\mathcal{H}(p)$
- $\mathcal{H}_{limit(p)}$: the heterogeneous elements under $p$ in the lattice
- $min(p)$: the size of the largest child of $p$; or, the number of 0's in the label of the subcontext whose label has the most 0's and matches all of the 1's in $p$'s label.
- lower bound ($lb(p)$): the cardinality of the powerset of $min(p)$.
- upper bound ($ub(p)$): $\sum_{k=1}^{min(p)}{max(p)\choose k}$
TODO: maybe if H(p) is small enough we could do exact counting with include-exclude
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fill(SubcontextList sublist)
Fill the lattice with given subcontexts.java.util.Set<Supracontext>
getSupracontexts()
-
-
-
Method Detail
-
fill
public void fill(SubcontextList sublist) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Description copied from interface:Lattice
Fill the lattice with given subcontexts. This is meant to be done only once for a given Lattice instance.
-
getSupracontexts
public java.util.Set<Supracontext> getSupracontexts()
- Specified by:
getSupracontexts
in interfaceLattice
- Returns:
- The list of supracontexts that were created by filling the supracontextual lattice. From this, you can compute the analogical set.
-
-