フィルターのクリア

Help, I need to know how to build a dataset. I have 7 txt file of bearing raw vibration generated. If can I need step by step. Already three days search.

3 ビュー (過去 30 日間)
Here attached with all raw vibration data mentioned above.
  2 件のコメント
William Rose
William Rose 2024 年 5 月 8 日
I looked at the contents of the seven files you uploaded. Each file has two columns of numbers, and no labels. Column 1 appears to be time. The sampling rate is 1000 Hz for all seven files. The duration is 1 second for 4 files, and 10 seconds for 3 files. I assume column 2 is a measure of vibration, such as force or displacement or acceleration.
The file names indicate the seven recordings are made under seven distinct conditions. Please explain how you plan to analyze the seven recordings, and what information you plan to obtain from the database. I am asking because the structure of the database should be related to the intended use of the database.
What do you want to do with this data?
Rusyaidi Yusri
Rusyaidi Yusri 2024 年 5 月 11 日
移動済み: Voss 2024 年 5 月 11 日
Hi, I need to make it as trained dataset for supervised model. But I lack of knowldge, how to do that.

サインインしてコメントする。

採用された回答

Tejas
Tejas 2024 年 5 月 23 日
Hi Rusyaidi,
In supervised learning, models require the provision of expected values or classes alongside the data entries they will predict on. Therefore, one way to create a training dataset from the provided text files is to assign all entries within a text file to a specific class. Here is a step-by-step procedure to accomplish this:
  • Begin by loading the contents of the text files
data = cell(7, 1);
fileNames = {'bearing_defect_ball.txt', 'bearing_defect_on_Retainer.txt'...
'bearing_defect_Outer_Race_vibration.txt','bearing_vibration_defect_on_seal.txt',...
'bearing_vibration_defect_on_shield.txt', 'defective_Inner_Race_vibration.txt',...
'Normal_bearing_condition_raw_data.txt'};
for i = 1:6
data{i} = readtable(fileNames{i}, 'Format', '%f%f', 'ReadVariableNames', false);
end
data{7} = readtable(fileNames{7}, 'HeaderLines', 1);
  • Next, add an extra column to dataset. This column should indicate the class to which each entry belongs.
class = {'class_1','class_2','class_3','class_4','class_5', 'class_6','class_7'};
for i = 1:7
data{i}.Condition = repmat(class(i), height(data{i}), 1);
end
dataSet = vertcat(data{:});
cv = cvpartition(height(dataSet), 'HoldOut', 0.3);
trainData = dataSet(training(cv), :);
testData = dataSet(test(cv), :);
model = fitctree(trainData(:, {'Var1', 'Var2'}), trainData.Condition);
This method represents one of several approaches to constructing a training dataset for supervised models. The final structure of the training dataset will be determined by the intended use of the data contained in the text files.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWeather and Atmospheric Science についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by