Data Analysis: EDA - ofithcheallaigh/masters_project GitHub Wiki

Introduction

This section will present some work carried out to understand how the data was segmented, which was used to give an indication of how well the data may lend itself to classification tasks.

Initial investigation in MATLAB

To try and understand how well the data was segmented, all the datasets were gathered together in MATLAB and a scatter plot was generated.

The MATLAB code used to generate the scatter plots is shown below:

% Setting up colours for plotting
colourArray = ["#e6194B", "#3cb44b", "#ffe119", "#4363d8", "#f58231", "#911eb4", "#42d4f4", "#f032e6", "#bfef45"];

data_folder = "D:\Courses\UUJ\Research Project\masters_project\MATLAB\Data";
% run_folder = pwd;

cd(data_folder);
[file,path] = uigetfile('*.csv','Select One or More Files','MultiSelect','on');
% filename_split = split(file,'_');

input_table = readtable(strcat(path,file));
% input_table = [a; b; c; d]; % Only used when manually entering data

inputTable = input_table;

fname = string(strcat(filename_split(2), '.txt'));
fileID = fopen(fname,'w');

% Scatter plotting
for i = 1:9

    plotTable = inputTable(inputTable.Grid == i, :);
    scatter(plotTable.Channel1, plotTable.Channel2,'color',colourArray{i},'marker','+')
    hold on
    title('grid0_closeddoor_clearhallway','Interpreter', 'none');
    xlabel("Channel1")
    ylabel("Channel2")
    
    
end
legend({'Grid 1';'Grid 2';'Grid 3';'Grid 4';'Grid 5';'Grid 6';'Grid 7'; 'Grid 8';'Grid 9'})

The scatter plot for all the datasets is shown below:

This data shows that there is a good separation between the data, which will be helpful in this research.