Gianluca,
On 04/08/08 14:52, gianluca massei wrote:
Thanks Moritz , great tip!
I'm working in a module that implemented ELECTRE algorithm.
I've just finisced a module named /r.roughset/ for knowledg discovery with rough set based on rough set library. You can download the source code from grass wiki (http://grass.osgeo.org/wiki/GRASS_AddOns#r.roughset) and I'm happy if sameone caould try it and report me tips or bugs.
Together with a colleague we are trying out your r.mcda.* multicriteria analysis [1] suite to work.
At this stage, we cannot comment on any results, yet, but just on the fact that it seems that the region and resolution settings have to be very restrictive (small region, coarse resolution) for the modules to work, otherwise we get out of memory errors (tested in with *.electre and *.regime).
This is due to the fact that you use a matrix which is (nrows*ncols)*(nrows*ncols), e.g. in lines 142 and 143 of r.mcda.electre/main.c
concordance_mat=G_alloc_matrix((nrows*ncols),(nrows*ncols));
discordance_mat=G_alloc_matrix((nrows*ncols),(nrows*ncols));
This means that on my computer the limit is a region of around 13000 cells, i.e. ~ 115 rows * 115 columns which really is not a lot.
Do you think there might be a different way of coding this to avoid using up so much memory ?
Moritz
[1] svn co https://svn.osgeo.org/grass/grass-addons/raster/mcda/
[speaking about
svn co https://svn.osgeo.org/grass/grass-addons/raster/mcda/ ]
On 05/11/08 18:09, gianluca massei wrote:
Mortiz,
thank you for interesting about mcda. I need help and suggest for better coding!
- Yes, r.mcda.electre, r.mcda.regime use G_alloc_matrix((nrows*ncols),(nrows*ncols)) with related memory problem. I'm looking for a better algorithm, especially for pairwise comparison that need large matrix ((nrows*ncols),(nrows*ncols)) for derive concordance and discordance matrix. Now I don't find it but I' still looking for. Could you give me a suggest ?.
I'm nor much of a C-guru, nor an expert in the methods you are trying to code, so I can try, but don't think I will be of much help on that front.
- I'm working "hardly" with r.roughset, expecially for use classify algorithm, without shell script for generating classified map. I hope to develop a module for "dominance base rough set" (http://en.wikipedia.org/wiki/Dominance-based_Rough_Set_Approach) in a few month that will complete the mcda suite.
- Documentation is still laking I know. I'm working for improve too.
I'm gratefully you if give me feed back about result, all the mcda modules are still under develop and testing
Whatever we can do we will, but I'm afraid it won't be much at this stage.
Moritz
Thanks,
Gianluca
(excuse for my bad English :-[ )
Moritz Lennert wrote:
Gianluca,
On 04/08/08 14:52, gianluca massei wrote:
Thanks Moritz , great tip!
I'm working in a module that implemented ELECTRE algorithm.
I've just finisced a module named /r.roughset/ for knowledg discovery with rough set based on rough set library. You can download the source code from grass wiki (http://grass.osgeo.org/wiki/GRASS_AddOns#r.roughset) and I'm happy if sameone caould try it and report me tips or bugs.
Together with a colleague we are trying out your r.mcda.* multicriteria analysis [1] suite to work.
At this stage, we cannot comment on any results, yet, but just on the fact that it seems that the region and resolution settings have to be very restrictive (small region, coarse resolution) for the modules to work, otherwise we get out of memory errors (tested in with *.electre and *.regime).
This is due to the fact that you use a matrix which is (nrows*ncols)*(nrows*ncols), e.g. in lines 142 and 143 of r.mcda.electre/main.c
concordance_mat=G_alloc_matrix((nrows*ncols),(nrows*ncols));
discordance_mat=G_alloc_matrix((nrows*ncols),(nrows*ncols));
This means that on my computer the limit is a region of around 13000 cells, i.e. ~ 115 rows * 115 columns which really is not a lot.
Do you think there might be a different way of coding this to avoid using up so much memory ?
Moritz
[1] svn co https://svn.osgeo.org/grass/grass-addons/raster/mcda/