data_dir = '2nd_test' merged_data = pd.DataFrame() for filename in os.listdir(data_dir): print(filename) dataset=pd.read_csv(os.path.join(data_dir, filename), sep=' \t') dataset_mean_abs = np.array(dataset.abs().mean()) dataset_mean_abs = pd.DataFrame(dataset_mean_abs.reshape(1,4)) dataset_mean_abs.index = merged_data = merged_data.append(dataset_mean_abs) merged_lumns = Īfter loading the vibration data, we transform the index to datetime format (using the following convention), and then sort the data by index in chronological order before saving the merged dataset as a. In the following example, I use the data from the 2nd Gear failure test (see readme document for further info on that experiment). We then merge together everything in a single dataframe. Each 10 minute datapoint is aggregated by using the mean absolute value of the vibration recordings over the 20.480 datapoints in each file. The first step is to import some useful packages and libraries for the analysis: # Common imports import os import pandas as pd import numpy as np from sklearn import preprocessing import seaborn as sns sns.set(color_codes= True) import matplotlib.pyplot as plt % matplotlib inline from numpy.random import seed from tensorflow import set_random_seed from keras.layers import Input, Dropout from import Dense from keras.models import Model, Sequential, load_model from keras import regularizers from keras.models import model_from_json Data loading and pre-processing:Īn assumption is that gear degradation occur gradually over time, so we use one datapoint every 10 minutes in the following analysis. Larger intervals of time stamps (showed in file names) indicate resumption of the experiment in the next working day. Each record (row) in the data file is a data point. The file name indicates when the data was collected. Each file consists of 20.480 points with the sampling rate set at 20 kHz. See the downloaded Readme Document for IMS Bearing Data for further information on the experiment and available data.Įach data set consists of individual files that are 1-second vibration signal snapshots recorded at specific intervals. To replicate the results in the original article, you first need to download the dataset from the NASA Acoustics and Vibration Database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |