public class ComparativeKMeansStrategy extends KDDStrategy
The ComparativeKMeansStrategy performs a basic KMeans clustering algorithm on a matrix that is the difference between a loaded set of analysis data and a given reference set of data. It instantiates a RawKMeansStrategy with that difference matrix.
Constructor and Description |
---|
ComparativeKMeansStrategy(ClusterKDDMatrix matrix)
The Constructor with direct matrix to cluster injection.
|
ComparativeKMeansStrategy(IDataProvider data)
The Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
executeStrategy()
This method allows subclasses to implement a unique clustering or anomaly
detection algorithm and produce a KDDAnalysisAsset for clients to display
and manipulate.
|
java.lang.String |
getName()
This operation returns the name of the asset.
|
int |
getNumberOfClusters() |
java.util.Properties |
getProperties()
This operation returns the entire list of properties for this
IAnalysisAsset as an instance of Java's Properties class.
|
java.util.ArrayList<Entry> |
getPropertiesAsEntryList()
This operation returns the asset's properties as a list of Entry objects.
|
java.lang.String |
getProperty(java.lang.String key)
This operation returns the value of one of the assets properties,
requested by a key.
|
AnalysisAssetType |
getType()
This operation returns the type of the IAnalysisAsset.
|
java.net.URI |
getURI()
This operation returns the URI of the asset.
|
void |
resetProperties()
This operations resets the properties of the asset to their default
state.
|
boolean |
setProperty(java.lang.String key,
java.lang.String value)
This operation sets the value of a property with the given key.
|
public ComparativeKMeansStrategy(IDataProvider data)
The Constructor
data
- public ComparativeKMeansStrategy(ClusterKDDMatrix matrix)
The Constructor with direct matrix to cluster injection.
matrix
- public int getNumberOfClusters()
public java.lang.String getName()
KDDStrategy
This operation returns the name of the asset.
getName
in interface IAnalysisAsset
getName
in class KDDStrategy
The name
public AnalysisAssetType getType()
KDDStrategy
This operation returns the type of the IAnalysisAsset.
getType
in interface IAnalysisAsset
getType
in class KDDStrategy
The type of the asset
public java.lang.String getProperty(java.lang.String key)
KDDStrategy
This operation returns the value of one of the assets properties, requested by a key. If that property does not exist, it returns null.
getProperty
in interface IAnalysisAsset
getProperty
in class KDDStrategy
key
- The key of the property that should be retrieved.
The value or null if the key does not exist.
public boolean setProperty(java.lang.String key, java.lang.String value)
KDDStrategy
This operation sets the value of a property with the given key. It returns true if the key is in the properties list and false if not. Calling this operation will never add new properties to the list.
setProperty
in interface IAnalysisAsset
setProperty
in class KDDStrategy
key
- The key whose value should be set.
value
- The value for the specified key. This value will only be set if the key exists.
True if the key is in the list, false otherwise.
public void resetProperties()
KDDStrategy
This operations resets the properties of the asset to their default state.
resetProperties
in interface IAnalysisAsset
resetProperties
in class KDDStrategy
public java.util.Properties getProperties()
KDDStrategy
This operation returns the entire list of properties for this IAnalysisAsset as an instance of Java's Properties class.
getProperties
in interface IAnalysisAsset
getProperties
in class KDDStrategy
The properties of this asset or null if no properties exist.
public java.util.ArrayList<Entry> getPropertiesAsEntryList()
KDDStrategy
This operation returns the asset's properties as a list of Entry objects.
getPropertiesAsEntryList
in interface IAnalysisAsset
getPropertiesAsEntryList
in class KDDStrategy
public java.net.URI getURI()
KDDStrategy
This operation returns the URI of the asset.
getURI
in interface IAnalysisAsset
getURI
in class KDDStrategy
The URI
public boolean executeStrategy()
KDDStrategy
This method allows subclasses to implement a unique clustering or anomaly detection algorithm and produce a KDDAnalysisAsset for clients to display and manipulate.
executeStrategy
in class KDDStrategy