public class CharacteristicVector extends Object
Constructor and Description |
---|
CharacteristicVector(int tg,
int tm,
double D,
int label,
boolean status,
double dl,
double dm) |
Modifier and Type | Method and Description |
---|---|
void |
densityWithNew(int currTime,
double decayFactor)
Implements the density update function given in
eq 5 (Proposition 3.1) of Chen and Tu 2007.
|
int |
getAttribute() |
double |
getCurrGridDensity(int currTime,
double decayFactor) |
int |
getDensityTimeStamp() |
double |
getGridDensity() |
int |
getLabel() |
int |
getRemoveTime() |
int |
getUpdateTime() |
boolean |
isAttChanged() |
boolean |
isDense(double dm)
Implements the test for whether a density grid is dense given
in eq 8 of Chen and Tu 2007.
|
boolean |
isSparse(double dl)
Implements the test for whether a density grid is sparse given
in eq 9 of Chen and Tu 2007.
|
boolean |
isSporadic() |
boolean |
isTransitional(double dm,
double dl)
Implements the test for whether a density grid is transitional
given in eq 10 of Chen and Tu 2007.
|
void |
setDensityTimeStamp(int densityTimeStamp) |
void |
setGridDensity(double gridDensity,
int timeStamp) |
void |
setLabel(int newLabel) |
void |
setRemoveTime(int removeTime) |
void |
setSporadic(boolean isSporadic) |
void |
setUpdateTime(int updateTime) |
String |
toString()
Overrides Object's toString method.
|
void |
updateGridDensity(int currTime,
double decayFactor,
double dl,
double dm)
Implements the update the density of all grids step given at line 2 of
both Fig 3 and Fig 4 of Chen and Tu 2007.
|
public CharacteristicVector(int tg, int tm, double D, int label, boolean status, double dl, double dm)
tg
- - the last time when g is updatedtm
- - the last time when g is removed from grid_listD
- - the grid density at the last updatelabel
- - the class label of the gridstatus
- - SPORADIC (true) or NORMAL (false)public int getUpdateTime()
public void setUpdateTime(int updateTime)
updateTime
- the time at which the grid was updatedpublic int getRemoveTime()
public void setRemoveTime(int removeTime)
removeTime
- the time at which the grid was removed from grid_listpublic double getGridDensity()
public double getCurrGridDensity(int currTime, double decayFactor)
currTime
- - the current time to calculate the density fordecayFactor
- - the decay factor, lambda, of the algorithmpublic void setGridDensity(double gridDensity, int timeStamp)
gridDensity
- the density of the gridtimeStamp
- the time at which the gridDensity is being updatedpublic int getLabel()
public void setLabel(int newLabel)
newLabel
- the label of the cluster to assign the grid topublic boolean isSporadic()
public void setSporadic(boolean isSporadic)
isSporadic
- TRUE if the characteristic vector is to be labelled as sporadic,
FALSE otherwisepublic int getDensityTimeStamp()
public void setDensityTimeStamp(int densityTimeStamp)
public void densityWithNew(int currTime, double decayFactor)
currTime
- the data stream's current internal timedecayFactor
- the value of lambdapublic void updateGridDensity(int currTime, double decayFactor, double dl, double dm)
currTime
- the data stream's current internal timedecayFactor
- the value of lambdadl
- the threshold for sparse gridsdm
- the threshold for dense gridsaddRecord
- TRUE if a record has been added to the density grid, FALSE otherwisepublic boolean isDense(double dm)
dm
- the threshold for dense gridspublic boolean isSparse(double dl)
dl
- the threshold for sparse gridspublic boolean isTransitional(double dm, double dl)
dm
- the threshold for dense gridsdl
- the threshold for sparse gridspublic int getAttribute()
public boolean isAttChanged()
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.