jhlee-visionkalman / accord

Automatically exported from code.google.com/p/accord
0 stars 0 forks source link

SequentialMinimalOptimization out of memory #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create an array of imputs for more than 10000 values in a row 
2.more than 500 rows 
3.SequentialMinimalOptimization

What is the expected output? What do you see instead?
out of memory exeption
Locating source for 
'D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\M
ulticlassSupportVectorLearning.cs'. Checksum: MD5 {56 e9 4d 58 59 a2 7e ab 57 5 
af dc 91 88 72 a6}
The file 
'D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\M
ulticlassSupportVectorLearning.cs' does not exist.
Looking in script documents for 
'D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\M
ulticlassSupportVectorLearning.cs'...
Looking in the projects for 
'D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\M
ulticlassSupportVectorLearning.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 
11.0\Common7\IDE\vc7\atlmfc'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 
11.0\Common7\IDE\vc7\crt'...
The debug source files settings for the active solution indicate that the 
debugger will not ask the user to find the file: 
D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\Mu
lticlassSupportVectorLearning.cs.
The debugger could not locate the source file 
'D:\Projects\Accord.NET\Sources\Accord.MachineLearning\VectorMachines\Learning\M
ulticlassSupportVectorLearning.cs'.

What version of the product are you using? On what operating system?
windows 7 .net 4.5 , accord version 2.7.1

Please provide any additional information below.
It only gives me an error when i add more than about 500 samples (inputs)Error 
is from visual studio 12 express

Original issue reported on code.google.com by Allegro....@gmail.com on 8 Nov 2012 at 7:00

GoogleCodeExporter commented 9 years ago
Thanks for submitting the bug report. I am investigating the issue, but while I 
am at it, may I ask if you are using a cache to conserve memory? 

The cache configuration is available in the SMO's CacheSize property. If you 
are getting Out of Memory exceptions, perhaps you could try reducing the cache 
to a more manageable value. If you have 500 instances in your learning set, try 
specifying a lower value, such as 200.

Please let me know if this solves the issue.

Regards,
Cesar

Original comment by cesarso...@gmail.com on 9 Nov 2012 at 3:32

GoogleCodeExporter commented 9 years ago
Hi Cesar

I am having the same problem on a core i7 with 8gb ram Accord version 2.8.1

if i use more than 3000 it will couse the crash in the 
MulticlassSupportVectorMachine but not in the KernelSupportVectorMachine. if i 
limit the cach size to under 2000 it sames to work fine.

it happens on the 
this.kernelCache = new KernelFunctionCache(kernel, inputs, cacheSize); 
line in the SequentialMinimalOptimization.cs file.

Original comment by dtp26...@gmail.com on 5 Feb 2013 at 3:52

GoogleCodeExporter commented 9 years ago
Hi dtp,

This means the cache is working properly. The cache is used to trade speed for 
memory; decreasing the cache size consumes less memory and makes it work.

Original comment by cesarso...@gmail.com on 5 Feb 2013 at 6:08

GoogleCodeExporter commented 9 years ago
Working as intended.

Original comment by cesarso...@gmail.com on 24 Feb 2013 at 2:52