|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.cluster.SimpleCluster | +--edu.stanford.nlp.cluster.HiddenState
Data Structure for clusters in LSSA.
HiddenState is a subclass of SimpleCluster which is specifically tailored towards HMM-based clustering methods. This differs from SoftCluster in that it stores an array of transition probabilities from this hidden class to each of the other hidden classes. In addition, it stores growable forward_trellis and backward_trellis Arrays that give the probability of the hidden state at each time step t given an observation sequence O.
Field Summary |
Fields inherited from class edu.stanford.nlp.cluster.SimpleCluster |
index, mean, nd, nt, pr_d_z, pr_w_z, pr_z, scatter |
Constructor Summary | |
HiddenState(int num_terms,
int num_docs,
int num_states)
Constructor: allocates memory for arrays, but does not initializes values |
|
HiddenState(int num_terms,
int num_docs,
int num_states,
int i)
|
Method Summary | |
Object |
clone()
overwrites Cluster.clone() so that all the additional structures in HiddenState are also copied to its clone |
ScientificNotationDouble |
get_a(int j)
|
ScientificNotationDouble |
get_alpha(int d,
int t)
|
ScientificNotationDouble |
get_b(int w)
|
ScientificNotationDouble |
get_beta(int d,
int t)
|
ScientificNotationDouble |
get_pi()
|
void |
initialize_alpha(Array O)
|
void |
initialize_alpha(DataCollection db)
allocates memory for alpha[][] |
void |
initialize_alpha(int d,
Array O)
allocates memory for alpha[d] |
void |
initialize_beta(Array O)
|
void |
initialize_beta(DataCollection db)
allocates memory for beta[][] |
void |
initialize_beta(int d,
Array O)
allocates memory for beta[d] |
void |
initialize_transition_probs()
Initialize: initializes random values pr_transition[], an array of transition probabilities from this state to all the other states Note: does not initialize values for pi (the probability that this class is the initial state) because the value for pi depends on the value for pi of all the other clusters, since sum_over_z(pi)=1 The value for pi is set in LSSA |
void |
print_pr_transition()
|
void |
print_trellis()
|
void |
set_a(int j,
ScientificNotationDouble value)
|
void |
set_alpha(int d,
int t,
ScientificNotationDouble value)
|
void |
set_alpha(ScientificNotationDouble[][] al)
|
void |
set_b(int w,
ScientificNotationDouble value)
|
void |
set_beta(int d,
int t,
ScientificNotationDouble value)
|
void |
set_beta(ScientificNotationDouble[][] bet)
|
void |
set_pi(ScientificNotationDouble p)
|
String |
toString(DataCollection dbm)
Returns 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 |
Methods inherited from class edu.stanford.nlp.cluster.SimpleCluster |
clearData, equals, evaluateIntraSimilarity, evaluateWeightedMean, get_pr_d_z, get_pr_d_z, get_pr_w_z, get_pr_w_z, get_pr_z, getIndex, getIntraSimilarity, getMean, set_pr_d_z, set_pr_d_z, set_pr_w_z, set_pr_w_z, set_pr_z, setIndex, toString, toXMLString |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HiddenState(int num_terms, int num_docs, int num_states)
public HiddenState(int num_terms, int num_docs, int num_states, int i)
Method Detail |
public void initialize_transition_probs()
public void initialize_alpha(Array O)
public void initialize_beta(Array O)
public void initialize_alpha(DataCollection db)
public void initialize_beta(DataCollection db)
public void initialize_alpha(int d, Array O)
public void initialize_beta(int d, Array O)
public ScientificNotationDouble get_alpha(int d, int t)
public ScientificNotationDouble get_beta(int d, int t)
public ScientificNotationDouble get_a(int j)
public void print_pr_transition()
public ScientificNotationDouble get_b(int w)
public void set_alpha(ScientificNotationDouble[][] al)
public void set_beta(ScientificNotationDouble[][] bet)
public void set_alpha(int d, int t, ScientificNotationDouble value)
public void set_beta(int d, int t, ScientificNotationDouble value)
public void set_a(int j, ScientificNotationDouble value)
public void set_b(int w, ScientificNotationDouble value)
public void set_pi(ScientificNotationDouble p)
public ScientificNotationDouble get_pi()
public Object clone()
clone
in interface Cluster
clone
in class SimpleCluster
public String toString(DataCollection dbm)
Cluster
toString
in interface Cluster
toString
in class SimpleCluster
public void print_trellis()
public String toXMLString(int tnf, int tnd, DataCollection dbm)
Cluster
toXMLString
in interface Cluster
toXMLString
in class SimpleCluster
tnf
- top n features. prints top tnf
features with largest probabilitiestnd
- top n datums. prints top tnd
datums with largest probabilities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |