|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Data Structure for Cluster.
Method Summary | |
void |
clearData()
Dets the value for all data in cluster = 0 |
Object |
clone()
Returns deep copy of Cluster |
boolean |
equals(Object o)
Implements equality test. |
double |
evaluateIntraSimilarity(Matrix m,
Array mean)
Evaluates the cohesiveness of Cluster A low value reflects a cohesive cluster, and a high value reflects a scattered cluster; |
Array |
evaluateWeightedMean(Matrix m)
Evaluates weighted mean of columns in Matrix m. |
Array |
get_pr_d_z()
Returns entire probabilitiy distribution P(w|z) |
double |
get_pr_d_z(int datum_index)
Returns P(d|z) for d=datum_index |
Array |
get_pr_w_z()
Returns entire probability distribution P(w|z) |
double |
get_pr_w_z(int feature_index)
Returns P(w|z) for w=feature_index |
double |
get_pr_z()
Returns P(z) |
int |
getIndex()
Returns cluster's index |
double |
getIntraSimilarity()
Returns scatter value of Cluster, if it has already been computed |
Array |
getMean()
Returns weighted mean of Cluster, if it has already been computed |
void |
set_pr_d_z(Array prdz)
Sets entire P(d|z) array to prdz |
void |
set_pr_d_z(int datum_index,
double value)
Sets P(d|z) for d= datum_index to value
P(d|z) is the probability of datum d, given this cluster |
void |
set_pr_w_z(Array prwz)
Sets entire P(w|z) array to prwz |
void |
set_pr_w_z(int feature_index,
double value)
Sets P(w|z) for w= feature_index to value
P(w|z) is the probability of feature w, given this cluster |
void |
set_pr_z(double value)
Sets P(z) to value
P(z) is the cluster probability, or cluster weight |
void |
setIndex(int i)
Sets cluster index to i |
String |
toString(DataCollection dbm)
Returns String representation of Cluster prints default number of features and data. |
String |
toString(int tnf,
int tnd,
DataCollection dbm)
Returns String representation of Cluster |
String |
toXMLString(DataCollection dbm)
Returns XML String representation of Cluster prints default number of features and data. |
String |
toXMLString(int tnf,
int tnd,
DataCollection dbm)
Returns XML String representation of Cluster |
Method Detail |
public void set_pr_z(double value)
value
P(z) is the cluster probability, or cluster weight
public void set_pr_w_z(int feature_index, double value)
feature_index
to value
P(w|z) is the probability of feature w, given this cluster
public void set_pr_w_z(Array prwz)
P(w|z)
array to prwz
public void set_pr_d_z(int datum_index, double value)
datum_index
to value
P(d|z) is the probability of datum d, given this cluster
public void set_pr_d_z(Array prdz)
P(d|z)
array to prdz
public void setIndex(int i)
public double get_pr_z()
public double get_pr_w_z(int feature_index)
public Array get_pr_w_z()
public double get_pr_d_z(int datum_index)
public Array get_pr_d_z()
public int getIndex()
public String toXMLString(int tnf, int tnd, DataCollection dbm)
tnf
- top n features. prints top tnf
features with largest probabilitiestnd
- top n datums. prints top tnd
datums with largest probabilitiespublic String toXMLString(DataCollection dbm)
public String toString(int tnf, int tnd, DataCollection dbm)
tnf
- top n features. prints top tnf
features with largest probabilitiestnd
- top n datums. prints top tnd
datums with largest probabilitiespublic String toString(DataCollection dbm)
public Object clone()
clone
in class Object
public boolean equals(Object o)
o==this
, and false if o!=this
.
equals
in class Object
public Array evaluateWeightedMean(Matrix m)
public double evaluateIntraSimilarity(Matrix m, Array mean)
public double getIntraSimilarity()
public Array getMean()
public void clearData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |