public static class MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine extends MetaObjectProfiSCTiDIM
MetaObjectProfiSCT
.MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine, MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMWithTKStrings
MetaObjectProfiSCT.DatabaseKeywordClassifier, MetaObjectProfiSCT.DatabaseSupport, MetaObjectProfiSCT.MetaObjectProfiSCTKwDistCosine, MetaObjectProfiSCT.MetaObjectProfiSCTKwDistJaccard, MetaObjectProfiSCT.MetaObjectProfiSCTWithTKStrings, MetaObjectProfiSCT.MultiWeightIgnoreProviderProfi, MetaObjectProfiSCT.ProfiSCTWeightedCosineDistanceFunction, MetaObjectProfiSCT.Rights, MetaObjectProfiSCT.Territory
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
added, archiveID, attractiveness, colorLayout, colorStructure, defaultBinarySerializator, descriptorNames, edgeHistogram, KEYWORD_SPLIT_REGEXP, keyWords, keywordString, regionShape, rights, scalableColor, SEARCH_SPLIT_REGEXP, territories, TITLE_SPLIT_REGEXP, titleString
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Constructor and Description |
---|
MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream)
Creates a new instance of MetaObjectProfiSCTiDIMKwDistCosine from the given text stream.
|
MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream,
java.lang.Float keywordsWeight,
float[] keywordLayerWeights)
Creates a new instance of MetaObjectProfiSCTiDIMKwDistCosine from the given text stream.
|
MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream,
Stemmer stemmer,
IntStorageIndexed<java.lang.String> wordIndex,
java.lang.Float keywordsWeight,
float[] keywordLayerWeights)
Creates a new instance of MetaObjectProfiSCTiDIMKwDistCosine.
|
MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(MetaObjectProfiSCT object,
java.lang.Float keywordsWeight,
ObjectIntMultiVector.WeightProvider kwWeightProvider)
Creates a new instance of MetaObjectProfiSCTiDIMKwDistCosine from the given
MetaObjectProfiSCT . |
Modifier and Type | Method and Description |
---|---|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float[] metaDistances,
float distThreshold)
The actual implementation of the metric function.
|
clone, cloneRandomlyModify, getMaxDistance, getWeights, wrapWithKwStringSerialization, wrapWithTitleOnlySerialization
binarySerialize, containsTerritory, convertWordsToIdentifiers, dataEquals, dataHashCode, getAdded, getArchiveID, getAttractiveness, getBinarySize, getKeywords, getKeyWords, getKeywordWords, getObject, getObjectCount, getObjectNames, getObjects, getRights, getSearchWords, getStringData, getStringData, getStringDataFields, getSupportedVisualDescriptorTypes, getTerritories, getTitle, getTitleWords, writeData
clearSurplusData, containsObject, createMetaDistancesHolder, createSearchMetaObject, fillMetaDistances, fillMetaDistances, getDistanceImpl, getObjectFromMap, getObjectMap, getSize, implementationGetDistance, readObject, readObject, readObjects, readObjects, readObjectsHeader, toString, writeObjects, writeObjectsHeader
clone, create, create, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, parseObjectComment, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(MetaObjectProfiSCT object, java.lang.Float keywordsWeight, ObjectIntMultiVector.WeightProvider kwWeightProvider)
MetaObjectProfiSCT
.
The locator and the encapsulated objects from the source object
are
taken.object
- the source metaobject from which to get the datakeywordsWeight
- the weight for combining the keywords distance with the visual descriptors distance,
if null, only the text distance is usedkwWeightProvider
- the weight provider for different layers of keywords (title, etc.)public MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream, Stemmer stemmer, IntStorageIndexed<java.lang.String> wordIndex, java.lang.Float keywordsWeight, float[] keywordLayerWeights) throws java.io.IOException
stream
- stream to read the data fromstemmer
- instances that provides a Stemmer
for word transformationwordIndex
- the index for translating words to addresseskeywordsWeight
- the weight for combining the keywords distance with the visual descriptors distance,
if null, only the text distance is usedkeywordLayerWeights
- the weights for different layers of keywords (title, etc.)java.io.IOException
- if reading from the stream failspublic MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream, java.lang.Float keywordsWeight, float[] keywordLayerWeights) throws java.io.IOException
stream
- the stream from which the data are readkeywordsWeight
- the weight for combining the keywords distance with the visual descriptors distance,
if null, only the text distance is usedkeywordLayerWeights
- the weights for different layers of keywords (title, etc.)java.io.IOException
- if there was an error reading the data from the streampublic MetaObjectProfiSCTiDIM.MetaObjectProfiSCTiDIMKwDistCosine(java.io.BufferedReader stream) throws java.io.IOException
stream
- the stream from which the data are readjava.io.IOException
- if there was an error reading the data from the streamprotected float getDistanceImpl(LocalAbstractObject obj, float[] metaDistances, float distThreshold)
MetaObject
metaDistances
parameter is not null, it should be filled
with the distances to the respective encapsulated objects (method
fillMetaDistances
can be used).getDistanceImpl
in class MetaObjectProfiSCTiDIM
obj
- the object to compute distance tometaDistances
- the array that is filled with the distances of the respective encapsulated objects, if it is not nulldistThreshold
- the threshold value on the distanceLocalAbstractObject.getDistance(messif.objects.LocalAbstractObject)