How to solve an error while using the command 'svmtrain'?

2 views (last 30 days)
Hi,
I am trying to classify a set of numeric data into two classes using SVM. There are 8 rows(observations) and 6 columns(features) in the training data. The target is a numeric column matrix of size 8x1.
The training data is
data_train =
0.0713 -0.0810 0.1523 0.0141 0.0135 13.1808
0.0789 -0.0974 0.1762 0.0161 0.0156 10.2324
0.0752 -0.0842 0.1595 0.0156 0.0151 10.9373
0.0905 -0.0940 0.1845 0.0184 0.0180 13.1222
0.8479 -0.7886 1.6365 0.0721 0.0720 27.8630
0.5273 -0.8057 1.3330 0.0750 0.0749 28.7584
0.4353 -0.5557 0.9911 0.0596 0.0595 25.1581
0.4944 -0.5167 1.0110 0.0524 0.0523 22.8835
The target data is
groups =
1
1
1
1
2
2
2
2
I use the following code
cp = classperf(groups);
svmStruct = svmtrain(data_train, groups,'Kernel_Function', 'rbf');
I get the following error message:
??? Undefined variable "internal" or class "internal.stats.getargs".
Error in ==> svmtrain at 294 [eid,errmsg,kfun,optimMethod, plotflag, polyOrder, ... mlpParams, boxC, rbf_sigma, autoScale, opts,... tolkkt, kktvl,kerCL,... kfunargs qpOptsInput, smoOptsInput] = ... internal.stats.getargs(pnames, dflts, varargin{:});
Could you please let me know what does this error mean, and how to overcome it?
I use MATLAB R2011a 64 bit version with Windows 7.
Thanks in advance.

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 25 Jul 2013
This sounds like a path issue. Can you try the following:
>> which -all internal.stats.getargs
You should see an output that tells you where it is. If you seen an output that says not found, you might have to reset your path.
>> restoredefaultpath
>> rehash toolboxcache

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!