getting a submatrix of all true
Roman Suzi
rnd at onego.ru
Tue Jul 8 06:39:38 CEST 2003
On Wed, 2 Jul 2003, John Hunter wrote:
>1 0 0 0 1
>0 0 0 0 0 0 0 0 0 0
>0 0 0 0 0 0 0 0 0 0 candidate submatrix has 15 elements
>0 0 0 0 0 0 0 0 0 0
>0 0 1 0 0
I think you can explore two ways to solve your problem. I have not
read all the replies in this thread, but these two ways are:
- look at the matrix as a representation for the graph and try to
understand how can you rearrange it to drop all missing values
(you will easily find ready-maid algorithms for rearranging sparse
matrices to the optimal (for your case) form by searching
in the library and/or Internet
- try to use algorithms or modify existent ones to allow for missing
values. You can also make some conditioning or making a vector (see below)
And also: I do not believe that values you drop are all of equal significance.
For example, if you have time series data where time is on the X axis, then
dropping several consequent columns can make more damage than dropping a row.
In most cases you better interpolate values.
Overall, every item of data is usually valuable for the accuracy.
Sometimes it's better to rework the model than drop any values.
For example, you can try make a matrix 1-column one (vector):
0
0
0
0
0
1
1
0
0
0
0
0
- then just drop missing elements.
Of course, this will be a novel view of your model and
probably other matrices of your model will become 100 bigger.
But computer power is cheaper each day.
Sincerely yours, Roman Suzi
--
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
More information about the Python-list
mailing list