So i have a project as a part of a final exam in which i have to create and train some models to detect malicious executables based on data mining and machine learning techniques. I have a dataset of 14998 samples grouped on two tables of 14998x543(features) and one 14998x1(classes of those samples).
I wrote some data arrangement code but when i tried to use that on the knn classiffier i got some weird errors.Hoping someone here can help as im new to matlab syntax.
Here is my code:
clear all
close all
clc
load ('C:\Users\Ζαρο-PC\Documents\MATLAB\PatRec Project\DataMist.mat');
load ('C:\Users\Ζαρο-PC\Documents\MATLAB\PatRec Project\DataMistClasses.mat');;
inds= randperm(size(Dataset,1));
training = Dataset(inds(1:10000),:);
train_classes = DatasetMistClasses(inds(1:10000),:);
testing = Dataset(inds(10001:end),:);
test_classes = DatasetMistClasses(inds(10001:end),:);
c= knnclassify(testing,training,train_classes);
cp = classperf(c,test_classes);
cp.CorrectRate
And these are the following errors...:
Error using statslib.internal.grp2idx (line 44) You cannot subscript a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts). Use a row subscript and a variable subscript.
Error in grp2idx (line 28) [varargout{1:nargout}] = statslib.internal.grp2idx(s);
Error in knnclassify (line 86) [gindex,groups] = grp2idx(group);
Error in PatternRegognitionLabProject (line 19) c= knnclassify(testing,training,train_classes)
Really hope someone solves this as i busted my brain open trying to fix it. Thanks in advance, Dimitris
CASE CLOSED