-
Notifications
You must be signed in to change notification settings - Fork 0
/
Preprocessing3.m
43 lines (32 loc) · 929 Bytes
/
Preprocessing3.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%% Dados
clear all
clc
load('metaInputs.mat');
load('metaTargets.mat')
%% Data with all news parameters
%25% of data for testing
testingData = metaInputs(:,1:4:end);
testingClass = metaTargets(:,1:4:end);
%75% of data for training
trainingData = metaInputs;
trainingClass = metaTargets;
for i = size(metaInputs,2):-1:1
if ismember(i,[1:4:size(metaInputs,2)]) == 1
trainingData(:,i) = [] ;
trainingClass(:,i) = [];
end
end
%% Data with only the 4 linguistic parameters
metaInputsLing = metaInputs([11 12 15 20],:);
%25% of data for testing
testingDataLing = metaInputsLing(:,1:4:end);
testingClassLing = metaTargets(:,1:4:end);
%75% of data for training
trainingDataLing = metaInputsLing;
trainingClassLing = metaTargets;
for i = size(metaInputsLing,2):-1:1
if ismember(i,[1:4:size(metaInputsLing,2)]) == 1
trainingDataLing(:,i)=[] ;
trainingClassLing(:,i) = [];
end
end