virgo-modules 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of virgo-modules might be problematic. Click here for more details.
- virgo_modules/src/hmm_utils.py +9 -7
- {virgo_modules-0.4.0.dist-info → virgo_modules-0.4.2.dist-info}/METADATA +2 -2
- {virgo_modules-0.4.0.dist-info → virgo_modules-0.4.2.dist-info}/RECORD +6 -6
- {virgo_modules-0.4.0.dist-info → virgo_modules-0.4.2.dist-info}/LICENSE +0 -0
- {virgo_modules-0.4.0.dist-info → virgo_modules-0.4.2.dist-info}/WHEEL +0 -0
- {virgo_modules-0.4.0.dist-info → virgo_modules-0.4.2.dist-info}/top_level.txt +0 -0
virgo_modules/src/hmm_utils.py
CHANGED
|
@@ -153,19 +153,21 @@ class trainer_hmm():
|
|
|
153
153
|
('drop_correlated', DropCorrelatedFeatures(method='spearman',threshold=self.__corr_thrshold)),
|
|
154
154
|
])
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
features_hmm_ = list(transform_pipe.fit_transform(self.__data_train).columns)
|
|
157
|
+
n_features = len(features_hmm_)
|
|
158
|
+
start_prob = 0.60
|
|
159
|
+
startprob_prior = np.array([1/self.__n_clusters]*self.__n_clusters)
|
|
160
|
+
transmat_prior = np.diag([start_prob]*self.__n_clusters)
|
|
161
|
+
transmat_prior[transmat_prior==0] = (1-start_prob)/(1-self.__n_clusters)
|
|
162
|
+
means_prior = np.array([1/n_features]*n_features)
|
|
161
163
|
pipeline_hmm = Pipeline([
|
|
162
164
|
('transfrom_pipe', transform_pipe),
|
|
163
165
|
('scaler', RobustScaler()),
|
|
164
166
|
('hmm', GaussianHMM(
|
|
165
167
|
n_components = self.__n_clusters, covariance_type = 'spherical',
|
|
166
|
-
|
|
168
|
+
startprob_prior = startprob_prior,
|
|
167
169
|
transmat_prior = transmat_prior,
|
|
168
|
-
|
|
170
|
+
means_prior = means_prior,
|
|
169
171
|
random_state = self.__seed,)
|
|
170
172
|
)
|
|
171
173
|
])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: virgo-modules
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: data processing and statistical modeling using stock market data
|
|
5
5
|
Home-page: https://github.com/miguelmayhem92/virgo_module
|
|
6
6
|
Author: Miguel Mayhuire
|
|
@@ -9,7 +9,7 @@ License: MIT
|
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.9
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.9
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Provides-Extra: dev
|
|
@@ -2,7 +2,7 @@ virgo_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
virgo_modules/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
virgo_modules/src/aws_utils.py,sha256=q0l7D7ofo09Lu1QQjv-esheQ06uiSy1Pdq3xMul8zvk,2571
|
|
4
4
|
virgo_modules/src/backtester.py,sha256=OhiWyzDX0PthXGuhChyWUmDN3cLkzVYe95zS4nGtia8,22106
|
|
5
|
-
virgo_modules/src/hmm_utils.py,sha256=
|
|
5
|
+
virgo_modules/src/hmm_utils.py,sha256=D7axAnCdSe1_1EgRyli2PAnM2f6699hTY9GcxjPXG-o,21221
|
|
6
6
|
virgo_modules/src/pull_artifacts.py,sha256=5OPrgR7pcMSdpbevDRhf0ebk7g7ZRjff4NpTIIWAKjE,1989
|
|
7
7
|
virgo_modules/src/re_utils.py,sha256=_wkDIKwUQFX_OT0kNA_zgDgoe808aEvSc4ZtviY2FMY,74104
|
|
8
8
|
virgo_modules/src/ticketer_source.py,sha256=jxP-OOeoyN2JxRQg-mX6t6WNJXiIrhWKDywDxpYANxU,101977
|
|
@@ -11,8 +11,8 @@ virgo_modules/src/edge_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
11
11
|
virgo_modules/src/edge_utils/conformal_utils.py,sha256=4gAOh2vxeWGR7iMF3TKnfQcLHlaH9M5B2lcmzo7V8AY,3755
|
|
12
12
|
virgo_modules/src/edge_utils/edge_utils.py,sha256=2K7-Ve8f0ywUeQCwOTDR8v0p7-ow3qV_2ME0w9oB3oc,18273
|
|
13
13
|
virgo_modules/src/edge_utils/shap_utils.py,sha256=OMKVO-4gtOng9GeSuhEgAEQe4FF3AtqXjm-GUBLqYFc,3349
|
|
14
|
-
virgo_modules-0.4.
|
|
15
|
-
virgo_modules-0.4.
|
|
16
|
-
virgo_modules-0.4.
|
|
17
|
-
virgo_modules-0.4.
|
|
18
|
-
virgo_modules-0.4.
|
|
14
|
+
virgo_modules-0.4.2.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
|
|
15
|
+
virgo_modules-0.4.2.dist-info/METADATA,sha256=BqyyzPjb7C-kTdUu4wClAIw_4Fx8TYo6GqCj2sQuL5Y,876
|
|
16
|
+
virgo_modules-0.4.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
17
|
+
virgo_modules-0.4.2.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
|
|
18
|
+
virgo_modules-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|