|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infomat.vectorspace.similarity.ISimilarity infomat.vectorspace.similarity.SparseISimilarity infomat.vectorspace.similarity.SparseDotSimilarity
public class SparseDotSimilarity
DotSimilarity. The dot product. If the "Normalize" property is set to "true" it will be the cosine measure. However, this is achieved faster by normalizing during weighting. In the latter case the group centroids are not normalized, which in fact might be good.
Field Summary | |
---|---|
private IMatrix |
matrix
|
private java.lang.Boolean |
normalize
|
private boolean |
row
|
Fields inherited from class infomat.vectorspace.similarity.ISimilarity |
---|
properties |
Constructor Summary | |
---|---|
SparseDotSimilarity()
|
|
SparseDotSimilarity(IMatrix matrix,
boolean row)
|
|
SparseDotSimilarity(IMatrix matrix,
boolean row,
Properties properties)
|
|
SparseDotSimilarity(SparseDotSimilarity sim)
|
Method Summary | ||
---|---|---|
Properties |
getDefaultProperties()
|
|
IVector<IVectorIndex> |
getGroupRepresentation(IObjectGroup iog)
|
|
IMatrix |
getIMatrix()
Returns the actual IMatrix. |
|
boolean |
getIMatrixDimension()
Returns a boolean that indicates wether the algorithm should consider rows or columns of a matrix. |
|
java.lang.String |
getName()
|
|
Properties |
getProperties()
|
|
java.lang.Object |
getPropertyValue(java.lang.String name)
|
|
java.util.Vector |
getPropertyVector()
|
|
IVector<IVectorIndex> |
getRepresentation(IObject io)
Returns the representation in the form of a IVector |
|
void |
setIMatrix(IMatrix matrix)
Sets the IMatrix. |
|
void |
setIMatrixDimension(boolean row)
Sets a boolean that indicates wether the algorithm should consider rows or columns of a matrix. |
|
void |
setProperties(Properties properties)
|
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
|
float |
sim(IObjectGroup iog1,
IObjectGroup iog2)
Calculates the similarity between two IObjectGroup:s. |
|
float |
sim(IObject io1,
IObject io2)
Calculates the similarity between two IObject:s. |
|
float |
sim(IObject io,
IObjectGroup iog)
Calculates the similarity between IObject and a IObjectGroup. |
|
|
sim(IVector<U> vec1,
IVector<V> vec2)
Calculates the similarity between two representations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IMatrix matrix
private boolean row
private java.lang.Boolean normalize
Constructor Detail |
---|
public SparseDotSimilarity()
public SparseDotSimilarity(SparseDotSimilarity sim)
public SparseDotSimilarity(IMatrix matrix, boolean row)
public SparseDotSimilarity(IMatrix matrix, boolean row, Properties properties)
Method Detail |
---|
public Properties getDefaultProperties()
getDefaultProperties
in interface HasProperties
public java.lang.String getName()
getName
in class ISimilarity
public java.util.Vector getPropertyVector()
public java.lang.Object getPropertyValue(java.lang.String name)
getPropertyValue
in interface HasProperties
public void setProperty(java.lang.String name, java.lang.Object value) throws PropertyNotFoundException
setProperty
in interface HasProperties
PropertyNotFoundException
public Properties getProperties()
getProperties
in interface HasProperties
public void setProperties(Properties properties)
setProperties
in interface HasProperties
public float sim(IObject io1, IObject io2)
sim
in class ISimilarity
public float sim(IObject io, IObjectGroup iog)
sim
in class ISimilarity
public float sim(IObjectGroup iog1, IObjectGroup iog2)
sim
in class ISimilarity
public <U extends IVectorIndex,V extends IVectorIndex> float sim(IVector<U> vec1, IVector<V> vec2)
sim
in class SparseISimilarity
public IVector<IVectorIndex> getRepresentation(IObject io)
getRepresentation
in class SparseISimilarity
public IVector<IVectorIndex> getGroupRepresentation(IObjectGroup iog)
getGroupRepresentation
in class SparseISimilarity
public void setIMatrix(IMatrix matrix)
NeedsIMatrix
setIMatrix
in interface NeedsIMatrix
public IMatrix getIMatrix()
NeedsIMatrix
getIMatrix
in interface NeedsIMatrix
public void setIMatrixDimension(boolean row)
NeedsIMatrixDimension
setIMatrixDimension
in interface NeedsIMatrixDimension
public boolean getIMatrixDimension()
NeedsIMatrixDimension
getIMatrixDimension
in interface NeedsIMatrixDimension
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |