0

我正在尝试在 matlab 上实现一个分类器,该分类器使用 RegressionTrees 作为其过程的一部分。现在我在回归树的 mex 文件中遇到异常。

这是崩溃转储的一部分

------------------------------------------------------------------------
       Segmentation violation detected at Tue Jun  4 11:49:48 2013
------------------------------------------------------------------------

Configuration:
  Crash Decoding     : Disabled
  Current Visual     : 0x21 (class 4, depth 24)
  Default Encoding   : UTF-8
  GNU C Library      : 2.13 stable
  MATLAB Architecture: glnxa64
  MATLAB Root        : /usr/local/MATLAB/R2013a
  MATLAB Version     : 8.1.0.604 (R2013a)
  Operating System   : Linux 3.0.0-31-generic #49-Ubuntu SMP Tue Feb 19 20:02:57 UTC 2013 x86_64
  Processor ID       : x86 Family 6 Model 42 Stepping 7, GenuineIntel
  Virtual Machine    : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System      : The X.Org Foundation (11004000), display :0

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 000000000a673ad8  RBX = 0000000008c85de8
  RCX = 0000000000000000  RDX = 00000000000002a5
  RSP = 00007f5fa88ba8e0  RBP = 00007f5fa88ba910
  RSI = 0000000008c85de8  RDI = 0000000008c825a0

   R8 = 0000000008c825a0   R9 = 0000000000003870
  R10 = 0000000000003001  R11 = ffefffffffffffff
  R12 = 0000000008c83ac0  R13 = 0000000008c83ac8
  R14 = 00007f5fa88ba930  R15 = 0000000000000119

  RIP = 00007f5f7a06e9fd  EFL = 0000000000010246

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f5f7a06e9fd /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00088573 _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEN12classregtree12IndexedIsNaNIdEEET_SA_SA_T0_St26random_access_iterator_tag+00000077
[  1] 0x00007f5f7a06eb29 /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00088873 _ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEN12classregtree12IndexedIsNaNIdEEET_SA_SA_T0_+00000041
[  2] 0x00007f5f7a085f20 /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00184096
[  3] 0x00007f5f7a0cf25b /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00483931
[  4] 0x00007f5f7a0d0580 /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00488832
[  5] 0x00007f5f7a0eb2c6 /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00598726
[  6] 0x00007f5f7a0698a3 /usr/local/MATLAB/R2013a/toolbox/stats/classreg/+classreg/+learning/+treeutils/growTree.mexa64+00067747 mexFunction+00001939
[  7] 0x00007f5fb2a1bf8a     /usr/local/MATLAB/R2013a/bin/glnxa64/libmex.so+00110474 mexRunMexFile+00000090
[  8] 0x00007f5fb2a180f9     /usr/local/MATLAB/R2013a/bin/glnxa64/libmex.so+00094457
[  9] 0x00007f5fb2a18f1c     /usr/local/MATLAB/R2013a/bin/glnxa64/libmex.so+00098076
[ 10] 0x00007f5fbc2ac6b2 /usr/local/MATLAB/R2013a/bin/glnxa64/libmwm_dispatcher.so+00562866 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000594
[ 11] 0x00007f5fb2ff453a  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+01672506
[ 12] 0x00007f5fb2f9513a  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+01282362
[ 13] 0x00007f5fb2f953be  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+01283006
[ 14] 0x00007f5fb2f9712c  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+01290540
[ 15] 0x00007f5fb3002246  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+01729094
[ 16] 0x00007f5fb3081cd8  /usr/local/MATLAB/R2013a/bin/glnxa64/libmwmcos.so+02251992
[ 17] 0x00007f5fbc25eaf8 /usr/local/MATLAB/R2013a/bin/glnxa64/libmwm_dispatcher.so+00244472 _ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2_+00000488
[ 18] 0x00007f5fbbb4a256 /usr/local/MATLAB/R2013a/bin/glnxa64/libmwm_interpreter.so+02245206
[ 19] 0x00007f5fbbafaa86 /usr/local/MATLAB/R2013a/bin/glnxa64/libmwm_interpreter.so+01919622
...
...

完整的故障转储http://snipt.org/AlK6

现在我怎么知道我对回归树的输入是导致错误还是与我的硬件有关?有没有办法知道错误的原因?


更新

这是导致异常的行(回归树行是主要原因)

for j = 1:J
    save('data');
    gj = RegressionTree.fit(trainData, Y_CODE(:, j), 'Weights', wts);
    g{j} = gj;
end

此代码片段是循环的一部分(实际上我正在尝试实现GAMBLE算法,如果您知道现有的实现会很棒),并且 matlab 每次在不同的迭代中崩溃..

我试图保存工作区save('data')并在重新启动matlab后重新执行回归树行,但它没有崩溃..这很奇怪。我已向 MathWorks 发送了崩溃报告。

同时是否有支持权重的回归树的matlab实现?还是更好的GAMBLE增强算法的实现?

谢谢

4

1 回答 1

3

只要您在满足已发布的MATLAB 系统要求的系统上运行,MathWorks 代码就不应该真的给您这样的分段违规 - 无论您传递给它的输入是什么。即使您完全胡说八道,它也应该优雅地停止并出现 MATLAB 错误,而不是像这样的硬错误。

如果您可以重现该行为(在新启动的 MATLAB 中,没有任何其他运行,每次使用相同的输入),请联系 MathWorks 支持以了解您的系统的某个方面是否不受支持,或报告错误。

于 2013-06-04T12:33:07.247 回答