V
- a certain subtype of NumberVector - the data matrix is supposed to
consist of rows where each row relates to an object of type V and the
columns relate to the attribute values of these objectsM
- Cluster model typepublic abstract class AbstractBiclustering<V extends NumberVector<?>,M extends BiclusterModel> extends AbstractAlgorithm<Clustering<M>> implements ClusteringAlgorithm<Clustering<M>>
NumberVector
), a column representing a dimension (attribute)
of the NumberVector
s.Modifier and Type | Field and Description |
---|---|
private int |
colDim
Column dimensionality.
|
private Database |
database
Keeps the currently set database.
|
private DBIDArrayIter |
iter
Iterator to use for more efficient random access.
|
protected Relation<V> |
relation
Relation we use.
|
protected ArrayDBIDs |
rowIDs
The row ids corresponding to the currently set
relation . |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBiclustering()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Clustering<M> |
biclustering()
Run the actual biclustering algorithm.
|
protected int[] |
colsBitsetToIDs(BitSet cols)
Convert a bitset into integer column ids.
|
protected int[] |
colsBitsetToIDs(long[] cols)
Convert a bitset into integer column ids.
|
protected Cluster<BiclusterModel> |
defineBicluster(BitSet rows,
BitSet cols)
Defines a Bicluster as given by the included rows and columns.
|
protected Cluster<BiclusterModel> |
defineBicluster(long[] rows,
long[] cols)
Defines a Bicluster as given by the included rows and columns.
|
protected int |
getColDim()
Provides the number of columns of the data matrix.
|
Database |
getDatabase()
Getter for database.
|
Relation<V> |
getRelation()
Getter for the relation.
|
protected DBID |
getRowDBID(int row)
Deprecated.
Expensive!
|
protected int |
getRowDim()
Provides the number of rows of the data matrix.
|
protected ArrayDBIDs |
rowsBitsetToIDs(BitSet rows)
Convert a bitset into integer row ids.
|
protected ArrayDBIDs |
rowsBitsetToIDs(long[] rows)
Convert a bitset into integer row ids.
|
Clustering<M> |
run(Relation<V> relation)
Prepares the algorithm for running on a specific database.
|
protected double |
valueAt(int row,
int col)
Returns the value of the data matrix at row
row and column
col . |
getInputTypeRestriction, getLogger, makeParameterDistanceFunction, run
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run
getInputTypeRestriction
private Database database
protected Relation<V extends NumberVector<?>> relation
private DBIDArrayIter iter
protected ArrayDBIDs rowIDs
relation
.private int colDim
public final Clustering<M> run(Relation<V> relation)
biclustering()
.
Any concrete algorithm should be implemented within method
biclustering()
by an inheriting biclustering approach.relation
- Relation to processprotected abstract Clustering<M> biclustering()
run(de.lmu.ifi.dbs.elki.database.relation.Relation<V>)
.
protected int[] colsBitsetToIDs(BitSet cols)
cols
- protected ArrayDBIDs rowsBitsetToIDs(BitSet rows)
rows
- protected Cluster<BiclusterModel> defineBicluster(BitSet rows, BitSet cols)
rows
- the rows included in the Biclustercols
- the columns included in the Biclusterprotected Cluster<BiclusterModel> defineBicluster(long[] rows, long[] cols)
rows
- the rows included in the Biclustercols
- the columns included in the Biclusterprotected double valueAt(int row, int col)
row
and column
col
.row
- the row in the data matrix according to the current order of
rows (refers to database entry
database.get(rowIDs[row])
)col
- the column in the data matrix according to the current order of
rows (refers to the attribute value of an database entry
getValue(colIDs[col])
)database.get(rowIDs[row]).getValue(colIDs[col])
@Deprecated protected DBID getRowDBID(int row)
row
- Row numberprotected int[] colsBitsetToIDs(long[] cols)
cols
- protected ArrayDBIDs rowsBitsetToIDs(long[] rows)
rows
- protected int getRowDim()
protected int getColDim()
public Database getDatabase()