Problem performing regression with SVM light in MATLAB

3 views (last 30 days)
Hi,
I am trying to perform support vector regression on some EEG data to predict an impulse response using Tom Briggs's MATLAB MEX-interface to SVM light. However, I can only get it to perform classification; when I call the function to regress I get a segmentation fault error in mexsvmlearn. The same problem has already been documented ( https://sourceforge.net/tracker/index.php?func=detail&aid=3169728&group_id=215547&atid=1034106 ) but I can't find any solutions online. Can anyone suggest what I may be doing wrong? Any help would be greatly appreciated.
Cheers, northdublad.
____________________________________________________________________
The error given by MATLAB is as follows:
>> x = [1:10]';
>> y = x*2 + 3 +normrnd(0,1,10,1);
>> m = svmlearn(x,y,'-t 0 -z r -c 1');
Optimizing.................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
...................................done. (385 iterations)
Optimization finished (maxdiff=0.00000).
Runtime in cpu-seconds: 0.12
Number of SV: 10 (including 8 at upper bound)
L1 loss: loss=5.01805
Norm of weight vector: |w|=2.06998
Norm of longest example vector: |x|=10.00000
Number of kernel evaluations: 1374
Saving minidump to file C:\DOCUME~1\crossem\LOCALS~1\Temp\matlab_crash_dump.3992.0.dmp
------------------------------------------------------------------------
Segmentation violation detected at Tue Jun 21 16:01:29 2011
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.6.0.324 (R2008a)
MATLAB License: 143690
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 3)
Processor ID: x86 Family 15 Model 4 Stepping 7, GenuineIntel
Virtual Machine: Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Encoding: windows-1252
Fault Count: 1
Register State:
EAX = 16cb4260 EBX = 00000000
ECX = 03f0a124 EDX = fffa5a5a
ESI = 16cb4260 EDI = 00000000
EBP = 00d3d1e8 ESP = 00d3d1c4
EIP = 02a29348 FLG = 00010293
Stack Trace:
[0] mexsvmlearn.mexw32:0x02a29348(0x03f2f9e0, 0x02a30d29, 0xfffa5a5a, 20)
[1] mexsvmlearn.mexw32:0x02a29eef(0x00d3d2a8, 0x00d3deb8, 0x00d3deb8, 0)
[2] mexsvmlearn.mexw32:0x02a11744(1, 0x00d3deb8, 3, 0x00d3df48)
[3] libmex.dll:_mexRunMexFile(1, 0x00d3deb8, 3, 0x00d3df48) + 129 bytes
[4] libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 3, 0x00d3df48) + 73 bytes
[5] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 3, 0x00d3df48) + 220 bytes
[6] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 3, 0x00d3df48) + 193 bytes
[7] m_interpreter.dll:void __cdecl mdCallFunction(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn *)(1, 0x00d3deb8, 3, 0x00d3df48) + 56 bytes
[8] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(1, 0x00d3deb8, 3, 0x00d3df48) + 93 bytes
[9] m_interpreter.dll:public: bool __thiscall Resolver::CallMFunction(int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *)(1, 1, 0x03f2f760, 0) + 1157 bytes
[10] m_interpreter.dll:bool __cdecl inResolveMFunctionCall(struct _m_function_desc *,int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *,enum inMarshalType *,int,class mpsTypeSequenceNlhs const *,struct mxArray_tag * (__cdecl*)(int))(0x1661b2e0, 1, 1, 0x03f2f760) + 157 bytes
[11] m_interpreter.dll:private: bool __thiscall accelImpl::MFunctionCall(struct _accelOp * *)(0x00d3e570, 0xffffffff, 0x044d35f0, 0x03e68a40) + 186 bytes
[12] m_interpreter.dll:public: enum jitReturnFlags __thiscall accelImpl::Exec(void)(0x044d35f0, 1, 0xffffffff, 0x03e68a40) + 189 bytes
[13] m_interpreter.dll:public: enum jitReturnFlags __thiscall accelCode::Call(enum inMarshalType *,int *)const (0x00d3e66c, 0x00d3e644, 1, 0) + 118 bytes
[14] m_interpreter.dll:public: static bool __cdecl inJit::ExecuteHotSegment(struct _inJitAccelInfo *,enum opcodes *,int *,int *)(0x00d3e710, 0x00d3e7c4, 0x00d3e774, 0x00d3e908) + 1874 bytes
[15] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 190, 17, 0) + 320 bytes
[16] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 190, 13, 0) + 74 bytes
[17] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 190, 13, 0) + 254 bytes
[18] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x171ba9e0, 0x171ba900, 0xffffffff, 0x171ba9e0) + 1330 bytes
[19] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(1, 0x00d3eb64, 3, 0x00d3ebc4) + 679 bytes
[20] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 1, 0x00d3eb64, 3) + 29 bytes
[21] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3eb64, 3, 0x00d3ebc4) + 28 bytes
[22] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3eb64, 3, 0x00d3ebc4) + 193 bytes
[23] m_interpreter.dll:__catch$?inDispatchFromStack@@YAHHPBDHH@Z$0(718, 0x0449684c "svmlearn", 1, 3) + 712 bytes
[24] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x0449684c "svmlearn", 718, 1, 3) + 146 bytes
[25] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 1, 0) + 2898 bytes
[26] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 74 bytes
[27] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 254 bytes
[28] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x025b78e0, 0x025b7801, 0xffffffff, 0x025b78e0) + 1330 bytes
[29] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00d3f3cc, 0, 0) + 679 bytes
[30] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00d3f3cc, 0) + 29 bytes
[31] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3f3cc, 0, 0) + 28 bytes
[32] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3f3cc, 0, 0) + 193 bytes
[33] m_interpreter.dll:void __cdecl inEvalPcodeHeaderToWord(struct _memory_context *,int,struct mxArray_tag * * const,struct _pcodeheader *,class Mfh_mp *,unsigned long)(0x7ad2e5e4, 0, 0x00d3f3cc, 0x00d3f288) + 201 bytes
[34] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_script_function(struct _memory_context *,struct _pcodeheader *,int,struct mxArray_tag * * const,unsigned long,bool)(0x7ad2e5e4, 0x00d3f288, 0, 0x00d3f3cc) + 91 bytes
[35] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalStringWithIsVarFcn(struct _memory_context *,char const *,enum EvalType,int,struct mxArray_tag * * const,enum inDebugCheck,struct _pcodeheader *,int *,bool (__cdecl*)(void *,char const *),void *,bool,bool)(0x7ad2e5e4, 0x017a4420 "m = svmlearn(x,y,'-t 0 -z r -c 1..", 0, 0) + 570 bytes
[36] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturn(char const *,int *,bool,bool,bool (__cdecl*)(void *,char const *))(0x017a4420 "m = svmlearn(x,y,'-t 0 -z r -c 1..", 0, 1, 0x79cad700) + 97 bytes
[37] m_interpreter.dll:_inEvalCmdWithLocalReturn(0x017a4420 "m = svmlearn(x,y,'-t 0 -z r -c 1..", 0, 0, 1) + 28 bytes
[38] bridge.dll:enum inExecutionStatus __cdecl evalCommandWithLongjmpSafety(char const *)(0x017a4420 "m = svmlearn(x,y,'-t 0 -z r -c 1..", 0x01691ff8, 0x01692058, 0x01691ff8) + 67 bytes
[39] bridge.dll:__catch$_mnParser$0(0x01691ff8, 0x03ffe598, 0x79730101, 0x017351f0) + 294 bytes
[40] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(0x004043ec, 402225, 0, 0x6d5c3a43) + 51 bytes
[41] MATLAB.exe:_WinMain@16(0x01692058, 0, 402225, 0x01691ff8) + 405 bytes
[42] MATLAB.exe:___tmainCRTStartup(0, 0, 0x7ffdf000, 0x8054b6ed) + 320 bytes
[43] kernel32.dll:0x7c817077(0x00401943, 0, 0x78746341, 32)
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
If it is an official MathWorks function, please
follow these steps to report this problem to The MathWorks so we
have the best chance of correcting it:
The next time MATLAB is launched under typical usage, a dialog box will
open to help you send the error log to The MathWorks. Alternatively, you
can send an e-mail to segv@mathworks.com with the following file attached:
C:\DOCUME~1\crossem\LOCALS~1\Temp\matlab_crash_dump.3992
If the problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/ts/help_request_1.html
A technical support engineer might contact you with further information.
Thank you for your help. MATLAB may attempt to recover, but even if recovery appears successful,
we recommend that you save your workspace and restart MATLAB as soon as possible.
[Please exit and restart MATLAB]>>

Answers (0)

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!