|
1 |
| -# sage.doctest: optional - numpy |
| 1 | +# sage.doctest: needs numpy |
2 | 2 | r"""
|
3 | 3 | Continuous Emission Hidden Markov Models
|
4 | 4 |
|
@@ -164,26 +164,25 @@ cdef class GaussianHiddenMarkovModel(HiddenMarkovModel):
|
164 | 164 |
|
165 | 165 | INPUT:
|
166 | 166 |
|
167 |
| - - ``A`` -- a list of lists or a square `N \times N` matrix, whose |
168 |
| - `(i,j)` entry gives the probability of transitioning from |
169 |
| - state `i` to state `j`. |
| 167 | + - ``A`` -- a list of lists or a square `N \times N` matrix, whose |
| 168 | + `(i,j)` entry gives the probability of transitioning from |
| 169 | + state `i` to state `j`. |
170 | 170 |
|
171 |
| - - ``B`` -- a list of `N` pairs ``(mu, std)``, where if ``B[i]=(mu,std)``, |
172 |
| - then the probability distribution associated with state `i` |
173 |
| - normal with mean ``mu`` and standard deviation ``std``. |
| 171 | + - ``B`` -- a list of `N` pairs ``(mu, std)``, where if ``B[i]=(mu,std)``, |
| 172 | + then the probability distribution associated with state `i` |
| 173 | + normal with mean ``mu`` and standard deviation ``std``. |
174 | 174 |
|
175 |
| - - ``pi`` -- the probabilities of starting in each initial |
176 |
| - state, i.e., ``pi[i]`` is the probability of starting in |
177 |
| - state `i`. |
| 175 | + - ``pi`` -- the probabilities of starting in each initial |
| 176 | + state, i.e., ``pi[i]`` is the probability of starting in |
| 177 | + state `i`. |
178 | 178 |
|
179 |
| - - ``normalize`` -- bool (default: ``True``); if given, input is |
180 |
| - normalized to define valid probability distributions, |
181 |
| - e.g., the entries of `A` are made nonnegative and the rows |
182 |
| - sum to 1. |
| 179 | + - ``normalize`` -- bool (default: ``True``); if given, input is |
| 180 | + normalized to define valid probability distributions, |
| 181 | + e.g., the entries of `A` are made nonnegative and the rows |
| 182 | + sum to 1. |
183 | 183 |
|
184 | 184 | EXAMPLES::
|
185 | 185 |
|
186 |
| -
|
187 | 186 | sage: hmm.GaussianHiddenMarkovModel([[.1,.9],[.5,.5]], [(1,1), (-1,1)], [.5,.5])
|
188 | 187 | Gaussian Hidden Markov Model with 2 States
|
189 | 188 | Transition matrix:
|
@@ -1422,7 +1421,7 @@ cdef class GaussianMixtureHiddenMarkovModel(GaussianHiddenMarkovModel):
|
1422 | 1421 | sage: m.emission_parameters()
|
1423 | 1422 | [0.4*N(0.0,1.0) + 0.6*N(1.0,0.1),
|
1424 | 1423 | 1.0*N(0.0,1.0)]
|
1425 |
| - r""" |
| 1424 | + """ |
1426 | 1425 | if not isinstance(obs, TimeSeries):
|
1427 | 1426 | obs = TimeSeries(obs)
|
1428 | 1427 | cdef TimeSeries _obs = obs
|
|
0 commit comments