analyser_hj3415 3.1.2__tar.gz → 3.2.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/PKG-INFO +1 -1
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/compile.py +11 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/tsa/prophet.py +5 -5
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/cli.py +1 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/pyproject.toml +1 -1
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/.gitignore +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/README.md +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/__init__.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/__init__.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/__init__.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/blue.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/common.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/growth.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/mil.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/eval/red.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/tsa/__init__.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/analyser/tsa/lstm.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/workroom/__init__.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/workroom/mysklearn.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/workroom/mysklearn2.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/workroom/score.py +0 -0
- {analyser_hj3415-3.1.2 → analyser_hj3415-3.2.0}/analyser_hj3415/workroom/trash.py +0 -0
@@ -36,6 +36,7 @@ class Compile:
|
|
36
36
|
self.prophet.code = code
|
37
37
|
|
38
38
|
def get(self, refresh=False) -> dict:
|
39
|
+
|
39
40
|
print(f"{self.code}/{self.name}의 compiling을 시작합니다.")
|
40
41
|
redis_name = self.code + '_compile_scores'
|
41
42
|
print(
|
@@ -110,6 +111,16 @@ class Compile:
|
|
110
111
|
corp_lstm.initializing()
|
111
112
|
corp_lstm.get_final_predictions(refresh=refresh, num=5)
|
112
113
|
|
114
|
+
@staticmethod
|
115
|
+
def analyse_lstm_mis(refresh: bool):
|
116
|
+
mi_lstm = tsa.MILSTM('wti')
|
117
|
+
print(f"*** LSTM prediction redis cashing Market Index items ***")
|
118
|
+
for mi_type in tsa.MIs.keys():
|
119
|
+
mi_lstm.mi_type = mi_type
|
120
|
+
print(f"{mi_lstm.mi_type}")
|
121
|
+
mi_lstm.initializing()
|
122
|
+
mi_lstm.get_final_predictions(refresh=refresh, num=5)
|
123
|
+
|
113
124
|
@staticmethod
|
114
125
|
def red_ranking(expect_earn: float = 0.06, refresh=False) -> OrderedDict:
|
115
126
|
# 이전 expect earn 과 비교하여 다르거나 없으면 강제 refresh 설정
|
@@ -128,10 +128,10 @@ class MyProphet:
|
|
128
128
|
fig2 = self.model.plot_components(self.df_forecast)
|
129
129
|
plt.show() # 시각화 창 띄우기
|
130
130
|
|
131
|
-
def export(self, to="
|
131
|
+
def export(self, to="html") -> Optional[str]:
|
132
132
|
"""
|
133
133
|
prophet과 plotly로 그래프를 그려서 html을 문자열로 반환
|
134
|
-
:param to:
|
134
|
+
:param to: html, png, file
|
135
135
|
:return:
|
136
136
|
"""
|
137
137
|
# Plotly를 사용한 시각화
|
@@ -161,7 +161,7 @@ class MyProphet:
|
|
161
161
|
showlegend=False,
|
162
162
|
)
|
163
163
|
|
164
|
-
if to == '
|
164
|
+
if to == 'html':
|
165
165
|
# 그래프 HTML로 변환 (string 형식으로 저장)
|
166
166
|
graph_html = plot(fig, output_type='div')
|
167
167
|
return graph_html
|
@@ -169,8 +169,8 @@ class MyProphet:
|
|
169
169
|
# 그래프를 PNG 파일로 저장
|
170
170
|
fig.write_image(f"myprophet_{self.ticker}.png")
|
171
171
|
return None
|
172
|
-
elif to == '
|
173
|
-
# 그래프를 HTML
|
172
|
+
elif to == 'file':
|
173
|
+
# 그래프를 HTML 파일로 저장
|
174
174
|
plot(fig, filename=f'myprophet_{self.ticker}.html', auto_open=False)
|
175
175
|
return None
|
176
176
|
else:
|
@@ -194,6 +194,7 @@ def analyser_manager():
|
|
194
194
|
compile.Compile.analyse_lstm_topn(refresh=args.refresh, top=args.top)
|
195
195
|
else:
|
196
196
|
compile.Compile.analyse_lstm_topn(refresh=args.refresh)
|
197
|
+
compile.Compile.analyse_lstm_mis(refresh=args.refresh)
|
197
198
|
except Exception as e:
|
198
199
|
print(e)
|
199
200
|
mymongo.Logs.save('cli','ERROR', f'analyser lstm caching 실행중 에러 - {e}')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|