聚烯烃配置添加数据库
This commit is contained in:
parent
5c3b9f8639
commit
be1e53bb08
@ -213,7 +213,7 @@ upload_data = {
|
||||
|
||||
|
||||
### 开关
|
||||
is_train = True # 是否训练
|
||||
is_train = False # 是否训练
|
||||
is_debug = False # 是否调试
|
||||
is_eta = True # 是否使用eta接口
|
||||
is_timefurture = True # 是否使用时间特征
|
||||
@ -226,6 +226,12 @@ is_del_corr = 0 # 是否删除相关性高的特征,取值为 0-1 ,0 为不删
|
||||
|
||||
|
||||
|
||||
# 连接到数据库
|
||||
db_mysql = MySQLDB(host=host, user=dbusername, password=password, database=dbname)
|
||||
db_mysql.connect()
|
||||
print("数据库连接成功",host,dbname,dbusername)
|
||||
|
||||
|
||||
# 数据截取日期
|
||||
end_time = '' # 数据截取日期
|
||||
freq = 'B' # 时间频率,"D": 天 "W": 周"M": 月"Q": 季度"A": 年 "H": 小时 "T": 分钟 "S": 秒 "B": 工作日
|
||||
@ -267,8 +273,9 @@ data_set = 'PP指标数据.xlsx' # 数据集文件
|
||||
dataset = 'juxitingdataset' # 数据集文件夹
|
||||
|
||||
# 数据库名称
|
||||
db_name = os.path.join(dataset,'jbsh_juxiting.db')
|
||||
|
||||
db_name = os.path.join(dataset,'jbsh_yuanyou.db')
|
||||
sqlitedb = SQLiteHandler(db_name)
|
||||
sqlitedb.connect()
|
||||
|
||||
settings = f'{input_size}-{horizon}-{train_steps}--{k}-{data_set}-{y}'
|
||||
# 获取日期时间
|
||||
@ -279,7 +286,7 @@ reportname = reportname.replace(':', '-') # 替换冒号
|
||||
### 邮件配置
|
||||
username='1321340118@qq.com'
|
||||
passwd='wgczgyhtyyyyjghi'
|
||||
# recv=['liurui_test@163.com','52585119@qq.com']
|
||||
# recv=['liurui_test@163.com']
|
||||
recv=['liurui_test@163.com']
|
||||
title=reportname
|
||||
content=y+'预测报告请看附件'
|
||||
|
Loading…
Reference in New Issue
Block a user