Package weka.classifiers.lazy.AM.lattice
Class HeterogeneousLattice
- java.lang.Object
-
- weka.classifiers.lazy.AM.lattice.HeterogeneousLattice
-
- All Implemented Interfaces:
Lattice
public class HeterogeneousLattice extends java.lang.Object implements Lattice
Same as a normal lattice, except no supracontext is deemed heterogeneous and hence everything is kept. Represents a lattice which is to be combined with other sublattices to determine predictions later on. When a sublattice is filled, there are two main differences:- Only a part of a an exemplar's features are used to assign lattice locations.
- No supracontext is ever determined to be heterogeneous. This is, of course, less efficient in some ways.
In terms of processing power, more is required to use sublattices. However, using threads the processing of each can be done in parallel.
-
-
Constructor Summary
Constructors Constructor Description HeterogeneousLattice(int partitionIndex)
Initializes Supracontextual lattice to a 2^n length array of Supracontexts, as well as the empty and the heterogeneous supracontexts.
-
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()
void
insert(Subcontext sub, Label label)
Inserts sub into the lattice, into location given by labeljava.lang.String
supraListToString()
-
-
-
Constructor Detail
-
HeterogeneousLattice
public HeterogeneousLattice(int partitionIndex)
Initializes Supracontextual lattice to a 2^n length array of Supracontexts, as well as the empty and the heterogeneous supracontexts.- Parameters:
partitionIndex
- which label partition to use in assigning subcontexts to supracontexts
-
-
Method Detail
-
fill
public void fill(SubcontextList subList)
Description copied from interface:Lattice
Fill the lattice with given subcontexts. This is meant to be done only once for a given Lattice instance.
-
insert
public void insert(Subcontext sub, Label label)
Inserts sub into the lattice, into location given by label- Parameters:
sub
- Subcontext to be insertedlabel
- label to be assigned to the subcontext
-
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.
-
supraListToString
public java.lang.String supraListToString()
- Returns:
- A string representation of the list of Supracontexts created when the Lattice was filled
-
-