analyser_hj3415 2.9.6__tar.gz → 2.9.7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/PKG-INFO +1 -1
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/cli.py +6 -2
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/tsa.py +6 -4
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/pyproject.toml +1 -1
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/.DS_Store +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/README.md +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/.DS_Store +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/__init__.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/eval.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/workroom/__init__.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/workroom/mysklearn.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/workroom/mysklearn2.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/workroom/score.py +0 -0
- {analyser_hj3415-2.9.6 → analyser_hj3415-2.9.7}/analyser_hj3415/workroom/trash.py +0 -0
@@ -55,6 +55,7 @@ def analyser_manager():
|
|
55
55
|
# caching 파서
|
56
56
|
caching_parser = lstm_subparser.add_parser('caching', help='lstm 랭킹 책정 및 레디스 저장')
|
57
57
|
caching_parser.add_argument('-r', '--refresh', action='store_true', help='래디스 캐시를 사용하지 않고 강제로 재계산 할지')
|
58
|
+
caching_parser.add_argument('-t', '--top', type=int, help='prophet ranking 몇위까지 작업을 할지')
|
58
59
|
caching_parser.add_argument('-n', '--noti', action='store_true', help='작업 완료 후 메시지 전송 여부')
|
59
60
|
# red - get 파서
|
60
61
|
lstm_get_parser = lstm_subparser.add_parser('get', help='lstm get 책정 및 레디스 저장')
|
@@ -224,9 +225,12 @@ def analyser_manager():
|
|
224
225
|
noti.telegram_to('manager', "오늘의 prophet ranking을 레디스캐시에 저장했습니다.(유효 24시간)")
|
225
226
|
elif args.type == 'lstm':
|
226
227
|
if args.command == 'caching':
|
227
|
-
|
228
|
+
if args.top:
|
229
|
+
tsa.MyLSTM.caching_based_on_prophet_ranking(refresh=args.refresh, top=args.top)
|
230
|
+
else:
|
231
|
+
tsa.MyLSTM.caching_based_on_prophet_ranking(refresh=args.refresh)
|
228
232
|
if args.noti:
|
229
|
-
noti.telegram_to('manager', "오늘의 lstm caching을 레디스캐시에 저장했습니다.(유효 24시간)")
|
233
|
+
noti.telegram_to('manager', f"오늘의 lstm caching(top={args.top if args.top else 20})을 레디스캐시에 저장했습니다.(유효 24시간)")
|
230
234
|
elif args.command == 'get':
|
231
235
|
assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
|
232
236
|
result = tsa.MyLSTM(args.code).get_final_predictions(refresh=args.refresh)
|
@@ -661,14 +661,16 @@ class MyLSTM:
|
|
661
661
|
plt.title('Stock Price Prediction with LSTM Ensemble')
|
662
662
|
plt.show()"""
|
663
663
|
|
664
|
-
|
664
|
+
@staticmethod
|
665
|
+
def caching_based_on_prophet_ranking(refresh: bool, top=20):
|
665
666
|
ranking_topn = OrderedDict(itertools.islice(MyProphet.ranking().items(), top))
|
666
667
|
tsa_logger.info(ranking_topn)
|
668
|
+
mylstm = MyLSTM('005930')
|
667
669
|
print(f"*** LSTM prediction redis cashing top{top} items ***")
|
668
670
|
for i, (code, _) in enumerate(ranking_topn.items()):
|
669
|
-
|
670
|
-
|
671
|
-
|
671
|
+
mylstm.code = code
|
672
|
+
print(f"{i+1}. {mylstm.code}/{mylstm.name}")
|
673
|
+
mylstm.get_final_predictions(refresh=refresh, num=5)
|
672
674
|
|
673
675
|
|
674
676
|
|
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
|