Domanda

Sto cercando di applicare un filtro Kalman alle letture del sensore usando Java, ma la libreria di manipolazione della matrice che sto usando mi sta dando un errore di heapspace.Quindi, qualcuno sa di una libreria di manipolazione a matrice per il JVM con caratteristiche di assegnazione della memoria migliori?

Sembrerebbe che questo - http://code.google.com / P / Efficient-Java-Matrix-Library / - è "efficiente" solo nel nome.Il set di dati ha 9424 righe di 2 colonne, tutti i valori sono doppi (timestamp e una dimensione su 3 su letture da un sensore).

Molte grazie, ragazzi!

È stato utile?

Soluzione

1) The Kalman filter should not require massive, non linear scaling amounts of memory : it is only calculating the estimates based on 2 values - the initial value, and the previous value. Thus, you should expect that the amount of memory you will need should be proportional to the total amount of data points. See : http://rsbweb.nih.gov/ij/plugins/kalman.html

2) Switching over to floats will 1/2 the memory required for your calculation . That will probably be insignificant in your case - I assume that if the data set is crashing due to memory, you are running your JVM with a very small amount of memory or you have a massive data set.

3) If you really have a large data set ( > 1G ) and halving it is important, the library you mentioned can be refactored to only use floats.

4) For a comparison of java matrix libraries, you can checkout http://code.google.com/p/java-matrix-benchmark/wiki/MemoryResults_2012_02 --- the lowest memory footprint libs are ojAlgo, EJML, and Colt. Ive had excellent luck with Colt for large scale calculations - but I'm not sure which ones implement the Kalaman method.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top