File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ Config.py
3+
4+ dataclasses를 이용함
5+ env 파일을 로드하고 supabase 및 각 파일의 path를 담고있음
6+ """
7+
18import os
29from dotenv import load_dotenv
310from supabase import create_client , Client
11+ from dataclasses import dataclass # create data class
412
513# env load
614load_dotenv ()
2230
2331# 논문 근거
2432model_pkl_path = 'SaveModel/upstock_sentiment_pkl.pkl' # import matplotlib.pyplot as plt
33+
34+ # TEST
35+ # model.summary()
36+
37+ # 데이터셋 null 개수 출력
38+ # print(news_data.isnull().sum())
39+ # RESULT
40+ # Text 0
41+ # Sentiment 0
42+ # dtype: int64
43+
44+ # 길이 열 추가해서 카운트하고 싶으면 Added lenght column
45+ # sentiment_data['lenght'] = sentiment_data['Text'].str.len()
46+ # print(sentiment_data['Text'].str.len().max())
47+ # RESULT 154
48+
49+ # 데이터셋 길이 통계 요약 출력
50+ # print(sentiment_data['Text'].str.len().describe())
51+ # RESULT
52+ # count 5791.000000
53+ # mean 78.507857
54+ # std 37.409135
55+ # min 6.000000
56+ # 25% 48.000000
57+ # 50% 79.000000
58+ # 75% 106.000000
59+ # max 154.000000
60+ # Name: Text, dtype: float64
61+
62+ # RESULT 데이터셋 maxlen 95
63+ # lengths = sentiment_data['Text'].str.len()
64+ # print(lengths.quantile(0.90)) # 133.0
65+ # print(lengths.quantile(0.95)) # 141.0
66+ # exit()
You can’t perform that action at this time.
0 commit comments