def __init__(self, path=f'.\\DB\\CSV\\'): # 필요 변수 선언 self.name = 'DataPreProcessing' self.path = path self.logging = log_recorder.Log().dir_recorder('RL', 'Dataprepro') # DataPreProcessing 클래스 객체 생성시 필요한 폴더 생성 self.mkdir = self.make_dir(path)
def __init__(self): self.logging = log_recorder.Log().dir_recorder('RL', 'test') self.prev = None self.pre = DataPreProcessing.DataPreProcessing()
def __init__(self): self.logging = log_recorder.Log().dir_recorder('RL', 'visualize') self.pre = DataPreProcessing.DataPreProcessing()
import os import pandas as pd import numpy as np import RLEnvTrain, RLAgent from tqdm import tqdm from datetime import datetime import RLtest import log_recorder import DataPreProcessing os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' pre = DataPreProcessing.DataPreProcessing() logging = log_recorder.Log().dir_recorder('RL', 'Main') Test = RLtest.TestEnv() code = 'A035720' logging.info(f'{code} 학습을 시작합니다.') df = pre.change_csv(code, category='m') df_train, df_test, df_prev = pre.train_test_split(code, category='m') logging.info( f'데이터셋 분리 Train : {len(df_train)} | Test : {len(df_test)} | Set-up : {len(df_prev)}학습을 시작합니다.' ) step = len(df_train) logging.info(f'한 학습당 step : {step}') #step = 10 logging.info(f'학습 환경 구성') env = RLEnvTrain.RLEnv(df_train) logging.info(f'학습 에이전트 구성') agent = RLAgent.Agent(gamma=0.98, eps_start=0.8, eps_end=0.01,
def __init__(self): self.input_num = 31 self.step_num = 1 self.logging = log_recorder.Log().dir_recorder('RL','Buildmodel')