用户输入数据集名称

dataset = input('Enter dataset (FD001, FD002, FD003, FD004): ')

需要使用的传感器

sensors = ['s_3', 's_4', 's_7', 's_11', 's_12']

滑动窗口长度

sequence_length = 30

平滑强度

alpha = 0.1

最大寿命阈值

threshold = 125

使用utils模块中的get_data函数获取训练、验证、测试数据

x_train, y_train, x_val, y_val, x_test, y_test = utils.get_data(dataset, sensors, sequence_length, alpha, threshold)

代码注释:Python 数据预处理示例

原文地址: https://www.cveoy.top/t/topic/jM5I 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录