|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.preprocessing.outlier.SearchObject
public class SearchObject
The SearchObject class creates SearchObjects which handle the representation of objects from the test data set in the core of the outlier operators. Such an object is able to store all relevant coordinates, dimensions, etc. for an object (e.g. from an Example from a RapidMiner ExampleSet) as well as perform various operations, such as radius search to other objects.
| Constructor Summary | |
|---|---|
SearchObject()
Constructor creates a new instance of SearchObject class and initializes the object with integer 2 dimensions and the String label not labeled object. |
|
SearchObject(int dim,
java.lang.String l)
Constructor creates a new instance of SearchObject class and initializes the object with integer dim dimensions and the String label l. |
|
SearchObject(int dim,
java.lang.String l,
int minptslb,
int minptsub)
Constructor creates a new instance of SearchObject class and initializes the object with integer dim dimensions and the String label l and an (integer) MinPts-Range. |
|
| Method Summary | |
|---|---|
void |
addKdContainer()
Adds a new KdContainer to the SearchObject at the end of the container list. |
void |
addKdContainer(int index)
Adds a new KdContainer to the SearchObject at index in the container list. |
void |
addKdContainer(int index,
double dist)
Adds a new KdContainer to the SearchObject at index in the container list and also sets the distance value of the container to dist. |
void |
addKdContainer(int index,
KdistanceContainer kd)
Adds an existing KdContainer to the container list at position index. |
void |
addKdContainer(KdistanceContainer kd)
Adds an existing KdContainer to the container lost at the end of the list. |
int |
getCardN(int k)
Returns the cardinality for k-neighbourhood (|N_k(p)|) for a SearchObject for k. |
int |
getDimensions()
Provides the (integer) number of dimensions of the Object. |
double |
getDistance(SearchObject toObject,
int kindOfDistance)
This method returns the distance between two objects according to a specification on which distance shall be computed (at the moment the method supports EUCLIDIAN distance (int kindOfDistance = 1) and COSINE distance (int kindOfDistance = 2) and the following similar distances: SQUARED (0) (the squared value of the metric/euclidian distance, INV_COSINE (3) the inversted cosine (actually the sine) distance which is simply 1-cos, and ANGLE_RADIANT (4) the angle between the objects related to zero coordinates in the actual n-dimensional euclidian coordinate system (ARC COSINE in radiant between [0 ; pi]). |
double |
getDistanceEuclidian(SearchObject toObject)
Returns the euclidian (metric) distance between two SearchObjects by looking at the object's vektors and returning the length of the substracted vector between the two object's vectors. |
java.util.ListIterator |
getKdContainerListIterator()
returns a ListIterator for the list of containes in the SearchObject. |
double |
getKDistance(int k)
Returns the k-distance for the SearchObject for k. |
java.lang.String |
getLabel()
Returns the label of the object (e.g. its "name" for other purposes) |
double |
getLOF(int k)
Returns the k-LOF for a SearchObject for k. |
double |
getLRD(int k)
Returns the local reachability density for k for a SearchObject. |
double |
getOutlierFactor()
Returns the Outlier factor of an object. |
boolean |
getOutlierStatus()
Provides the BOOLEAN Outlier status of an Object (-> the status has to be set through a test, so the user should see that the status is only set by methods providing a consistent view on the outlier test, else this has only the meaning of the accidentally stored status (default should be ZERO ;-). |
double |
getVektor(int dim)
Returns the value of the object's vektor with dimension (integer) dim. |
void |
setCardN(int k,
int card)
Sets the cardinality for k-neighbourhood (|N_k(p)|) for a SearchObject for k to card. |
void |
setDimensions(int dim)
Changes the number of dimensions for an object and copies the values of the old vector for the object into the new vektor (which is initialized with the new dimension number). |
void |
setKDistance(int k,
double dist)
Sets the k-distance for the SearchObject for k to dist. |
void |
setLabel(java.lang.String l)
Sets the label of the object to (String) l. |
void |
setLOF(int k,
double lof)
Sets the k-LOF for a SearchObject to lof for k. |
void |
setLRD(int k,
double lrdvalue)
Sets the local reachability density for k for a SearchObject for k to lrdvalue. |
void |
setOutlierFactor(double factor)
Sets a (double) Outlier factor to store smooth Outlier status information, such as local outlier factors and others. |
void |
setOutlierStatus(boolean status)
Sets a BOOLEAN Outlier Status for the object to store the results of Outlier tests according to a yes/no Outlier state (e.g. |
void |
setVektor(int dim,
double value)
Sets the vector for the object to (double) value for the dimension (integer) dim, with this method subsequently all dimensions of an objects vector can be set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchObject(int dim,
java.lang.String l)
public SearchObject()
public SearchObject(int dim,
java.lang.String l,
int minptslb,
int minptsub)
dim - l - minptslb - minptsub - | Method Detail |
|---|
public void setDimensions(int dim)
Changes the number of dimensions for an object and copies the values of the old vector for the object into the new vektor (which is initialized with the new dimension number).
Attention: If the new dimension number is less than the old number,
only the values of the relevant new domain range are copied. If the new vector
has more dimensions, all the old are copied and the new ones are initialized with
ZERO. Those should afterwards be initialized with the setVektor(int, double)
method in a proper manner.
The safest way to change the dimensions of an object is to create a new one with the new dimensions and to copy the vektor values and all other relevant data and to initialize the additional dimensions with the proper values.
public int getDimensions()
public void setLabel(java.lang.String l)
public java.lang.String getLabel()
public void setVektor(int dim,
double value)
dim - value - public double getVektor(int dim)
dim - public void setOutlierStatus(boolean status)
status - public boolean getOutlierStatus()
public void setOutlierFactor(double factor)
factor - public double getOutlierFactor()
public double getDistanceEuclidian(SearchObject toObject)
Returns the euclidian (metric) distance between two SearchObjects by looking at the object's vektors and returning the length of the substracted vector between the two object's vectors.
The method checks if both objects have the same dimensions and for ensuring smooth program execution takes the mimimum number of dimensions of the two objects. So it looks at a higher dimensional object as if it has only as many dimensions as the object with fewer dimensionality. ATTENTION: This - of course - creates different distance as if the object with maximum dimensions would be taken as the reference and the missing dimensions of the object with fewer dimensions would be set to zero.
It would be expected that an integrity check would be performed before using the
distance functions from any functions utilizing this distance.
E.g. SearchSpace.dimensionsIntegrityCheck() provides such an
integrity check for a search room's dimensions (although that function does not check
object to object integrity separately).
public double getDistance(SearchObject toObject,
int kindOfDistance)
The method substitutes the distance method
toObject - kindOfDistance - public void addKdContainer(int index)
public void addKdContainer(int index,
double dist)
public void addKdContainer(int index,
KdistanceContainer kd)
index - kd - public void addKdContainer(KdistanceContainer kd)
kd - public void addKdContainer()
public java.util.ListIterator getKdContainerListIterator()
public void setKDistance(int k,
double dist)
k - dist - public double getKDistance(int k)
k -
public void setLRD(int k,
double lrdvalue)
k - lrdvalue - public double getLRD(int k)
k -
public void setCardN(int k,
int card)
k - card - public int getCardN(int k)
k -
public void setLOF(int k,
double lof)
k - lof - public double getLOF(int k)
k -
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||