# Error when training support vector machine (SVM) classifier

I am running Classify function using a support vector machine model. I get an error that I can not fix.

Here is my code. The data is imported from a file *.txt:

files = FileNames["*.txt"];
data = N@Flatten[ReadList[#]] & /@ files;
Dimensions@data (*500*3000*)
trainset = Association[{"class1" -> data[[1 ;; 50]], "class2" -> data[[51 ;; 100]]}]
validset = Association[{"class1" -> data[[101 ;; 120]],  "class2" -> data[[101 ;; 120]]}]
Classify[trainset, ValidationSet -> validset, Method -> "SupportVectorMachine"].


Here is a link to the directory which contains all files. files

And here are the errors:

Dot::dotsh: Tensors <<>>,{1.,0.,0.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,<<791>>},<<48>>,<<50>>} and {<<>>,<<784>>} have incompatible shapes. >>

LinearAlgebraBLASGEMM::blrank: The argument MachineLearningGeneralPackagePrivatedist$182968 evaluates to rank 1. Rank 2 is expected. Transpose::nmtx: The first two levels of <<>> cannot be transposed. >> Commonest::arg1: The first argument is expected to be a list. >> LinearAlgebraBLASGEMM::blrank: The argument MachineLearningGeneralPackagePrivatedist$185704 evaluates to rank 1. Rank 2 is expected.

When I delete the validationSet option, or I use, for example, the LogisticRegression the training finishes correctly!

• virustotal.com/en/file/… – thedude Feb 12 '16 at 5:35
• I've reported similar bug in August. In my case I had kernel crash. Problem also was in ValidationSet. – Alexey Golyshev Feb 12 '16 at 9:55
• @AlexeyGolyshev What version do you use? I am running Mathematica 10.1.0 – BetterEnglish Feb 12 '16 at 13:49
• @Developer2000 10.3.1 – Alexey Golyshev Feb 12 '16 at 16:39