8
8
The :mod:`sklearn.hmm` module implements hidden Markov models.
9
9
10
10
**Warning:** :mod:`sklearn.hmm` is orphaned, undocumented and has known
11
- numerical stability issues. If nobody volunteers to write documentation and
12
- make it more stable, this module will be removed in version 0.11.
11
+ numerical stability issues. This module will be removed in version 0.17.
13
12
"""
14
13
15
14
import string
37
36
decoder_algorithms = ("viterbi" , "map" )
38
37
39
38
39
+ @deprecated ("WARNING: The HMM module and its functions will be removed in 0.17"
40
+ "as it no longer falls within the project's scope and API." )
40
41
def normalize (A , axis = None ):
41
42
""" Normalize the input array so that it sums to 1.
42
43
44
+ WARNING: The HMM module and its functions will be removed in 0.17
45
+ as it no longer falls within the project's scope and API.
46
+
43
47
Parameters
44
48
----------
45
49
A: array, shape (n_samples, n_features)
@@ -65,6 +69,8 @@ def normalize(A, axis=None):
65
69
return A / Asum
66
70
67
71
72
+ @deprecated ("WARNING: The HMM module and its function will be removed in 0.17"
73
+ "as it no longer falls within the project's scope and API." )
68
74
class _BaseHMM (BaseEstimator ):
69
75
"""Hidden Markov Model base class.
70
76
@@ -75,6 +81,11 @@ class _BaseHMM(BaseEstimator):
75
81
See the instance documentation for details specific to a
76
82
particular object.
77
83
84
+ .. warning::
85
+
86
+ The HMM module and its functions will be removed in 0.17
87
+ as it no longer falls within the project's scope and API.
88
+
78
89
Attributes
79
90
----------
80
91
n_components : int
@@ -152,8 +163,6 @@ def __init__(self, n_components=1, startprob=None, transmat=None,
152
163
self ._algorithm = algorithm
153
164
self .random_state = random_state
154
165
155
- @deprecated ("HMM.eval was renamed to HMM.score_samples in 0.14 and will be"
156
- " removed in 0.16." )
157
166
def eval (self , X ):
158
167
return self .score_samples (X )
159
168
@@ -600,6 +609,11 @@ class GaussianHMM(_BaseHMM):
600
609
This class allows for easy evaluation of, sampling from, and
601
610
maximum-likelihood estimation of the parameters of a HMM.
602
611
612
+ .. warning::
613
+
614
+ The HMM module and its functions will be removed in 0.17
615
+ as it no longer falls within the project's scope and API.
616
+
603
617
Parameters
604
618
----------
605
619
n_components : int
@@ -888,6 +902,11 @@ def fit(self, obs):
888
902
class MultinomialHMM (_BaseHMM ):
889
903
"""Hidden Markov Model with multinomial (discrete) emissions
890
904
905
+ .. warning::
906
+
907
+ The HMM module and its functions will be removed in 0.17
908
+ as it no longer falls within the project's scope and API.
909
+
891
910
Attributes
892
911
----------
893
912
n_components : int
@@ -1081,6 +1100,11 @@ def fit(self, obs, **kwargs):
1081
1100
class GMMHMM (_BaseHMM ):
1082
1101
"""Hidden Markov Model with Gaussin mixture emissions
1083
1102
1103
+ .. warning::
1104
+
1105
+ The HMM module and its functions will be removed in 0.17
1106
+ as it no longer falls within the project's scope and API.
1107
+
1084
1108
Attributes
1085
1109
----------
1086
1110
init_params : string, optional
0 commit comments