Browse Source

cleaned the future warning message.

master
김선중 1 year ago
parent
commit
60e6205f9a
5 changed files with 1470 additions and 5414 deletions
  1. BIN
      Scripts/__pycache__/generate_signals.cpython-312.pyc
  2. BIN
      Scripts/__pycache__/preprocess_daily.cpython-312.pyc
  3. +3
    -3
      Scripts/generate_signals.py
  4. +1
    -1
      Scripts/preprocess_daily.py
  5. +1466
    -5410
      analysis/0725_main_test/6_use_class_gs.ipynb

BIN
Scripts/__pycache__/generate_signals.cpython-312.pyc View File


BIN
Scripts/__pycache__/preprocess_daily.cpython-312.pyc View File


+ 3
- 3
Scripts/generate_signals.py View File

@ -171,7 +171,7 @@ class SignalGenerator():
self.history = pd.read_csv(os.path.join(self.path_tables, 'TL_IF_SIGL_CYCL.csv'), dtype=loading_dtype) self.history = pd.read_csv(os.path.join(self.path_tables, 'TL_IF_SIGL_CYCL.csv'), dtype=loading_dtype)
self.inter_node = pd.read_csv(os.path.join(self.path_tables, 'inter_node.csv'), dtype=loading_dtype) self.inter_node = pd.read_csv(os.path.join(self.path_tables, 'inter_node.csv'), dtype=loading_dtype)
self.matching = pd.read_csv(os.path.join(self.path_intermediates, 'matching.csv'), dtype=loading_dtype) self.matching = pd.read_csv(os.path.join(self.path_intermediates, 'matching.csv'), dtype=loading_dtype)
self.match1 = pd.read_csv(os.path.join(self.path_intermediates, 'match1.csv'), dtype=loading_dtype)
self.match1 = pd.read_csv(os.path.join(self.path_intermediates, 'match1.csv'), dtype=loading_dtype)
self.match6 = pd.read_csv(os.path.join(self.path_intermediates, 'match6.csv'), dtype=loading_dtype) self.match6 = pd.read_csv(os.path.join(self.path_intermediates, 'match6.csv'), dtype=loading_dtype)
# 신호이력 컬럼 변경 등 # 신호이력 컬럼 변경 등
@ -822,8 +822,8 @@ class SignalGenerator():
SIG = pd.merge(csig_A, csig_B, on=['start_time', 'start_unix'], how='outer') SIG = pd.merge(csig_A, csig_B, on=['start_time', 'start_unix'], how='outer')
SIG = SIG.sort_values(by='start_time').reset_index(drop=True) SIG = SIG.sort_values(by='start_time').reset_index(drop=True)
SIG[['phas_A', 'state_A']] = SIG[['phas_A', 'state_A']].fillna(method='ffill')
SIG[['phas_B', 'state_B']] = SIG[['phas_B', 'state_B']].fillna(method='ffill')
SIG[['phas_A', 'state_A']] = SIG[['phas_A', 'state_A']].ffill()
SIG[['phas_B', 'state_B']] = SIG[['phas_B', 'state_B']].ffill()
SIG['phase'] = SIG['phas_A'] + "_" + SIG['phas_B'] SIG['phase'] = SIG['phas_A'] + "_" + SIG['phas_B']
SIG['node_id'] = node_id SIG['node_id'] = node_id
SIG = SIG[['node_id', 'start_unix', 'start_time', 'phase', 'state_A', 'state_B']] SIG = SIG[['node_id', 'start_unix', 'start_time', 'phase', 'state_A', 'state_B']]

+ 1
- 1
Scripts/preprocess_daily.py View File

@ -61,7 +61,7 @@ class DailyPreprocessor():
# 테이블 불러오기 # 테이블 불러오기
self.inter_node = pd.read_csv(os.path.join(self.path_tables, 'inter_node.csv'), dtype=loading_dtype) self.inter_node = pd.read_csv(os.path.join(self.path_tables, 'inter_node.csv'), dtype=loading_dtype)
self.turn_type = pd.read_csv(os.path.join(self.path_tables, 'turn_type.csv'), dtype=loading_dtype) self.turn_type = pd.read_csv(os.path.join(self.path_tables, 'turn_type.csv'), dtype=loading_dtype)
self.uturn = pd.read_csv(os.path.join(self.path_tables, 'uturn.csv'), dtype=loading_dtype)
self.uturn = pd.read_csv(os.path.join(self.path_tables, 'uturn.csv'), dtype=loading_dtype)
self.u_condition= pd.read_csv(os.path.join(self.path_tables, 'u_condition.csv'), dtype=loading_dtype) self.u_condition= pd.read_csv(os.path.join(self.path_tables, 'u_condition.csv'), dtype=loading_dtype)
self.coord = pd.read_csv(os.path.join(self.path_tables, 'coord.csv'), dtype=loading_dtype) self.coord = pd.read_csv(os.path.join(self.path_tables, 'coord.csv'), dtype=loading_dtype)

+ 1466
- 5410
analysis/0725_main_test/6_use_class_gs.ipynb
File diff suppressed because it is too large
View File


Loading…
Cancel
Save