infomat.algorithms.projection
Class ProjectionSimilarity
java.lang.Object
infomat.vectorspace.similarity.ISimilarity
infomat.vectorspace.similarity.DenseISimilarity
infomat.algorithms.projection.ProjectionSimilarity
- All Implemented Interfaces:
- HasProperties
public class ProjectionSimilarity
- extends DenseISimilarity
Similarity measure for a projected matrix representation.
A dense representation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ioReprMap
private java.util.HashMap<IObject,float[]> ioReprMap
ProjectionSimilarity
public ProjectionSimilarity()
getDefaultProperties
public Properties getDefaultProperties()
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.String name)
setProperty
public void setProperty(java.lang.String name,
java.lang.Object value)
throws PropertyNotFoundException
- Throws:
PropertyNotFoundException
getProperties
public Properties getProperties()
setProperties
public void setProperties(Properties properties)
put
protected void put(IObject io,
float[] repr)
sim
public float sim(IObject io1,
IObject io2)
- Specified by:
sim
in class ISimilarity
sim
public float sim(IObject io,
IObjectGroup iog)
- Specified by:
sim
in class ISimilarity
sim
public float sim(IObjectGroup iog1,
IObjectGroup iog2)
- Specified by:
sim
in class ISimilarity
sim
public float sim(float[] repr1,
float[] repr2)
- Specified by:
sim
in class DenseISimilarity
getRepresentation
public float[] getRepresentation(IObject io)
- Specified by:
getRepresentation
in class DenseISimilarity
normalizeAll
public void normalizeAll()
normalize
private void normalize(float[] repr)
getGroupRepresentation
public float[] getGroupRepresentation(IObjectGroup iog)
- Specified by:
getGroupRepresentation
in class DenseISimilarity
getUnnormalizedGroupRepresentation
public float[] getUnnormalizedGroupRepresentation(IObjectGroup iog)
- Specified by:
getUnnormalizedGroupRepresentation
in class DenseISimilarity
add
private void add(float[] cumulator,
float[] addition)
getName
public java.lang.String getName()
- Specified by:
getName
in class ISimilarity