ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: getting a submatrix of all true
by Roman Suzi other posts by this author
Jul 8 2003 4:39AM messages near this date
getting a submatrix of all true | ANN: Pyro 3.3 beta
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@[...].ru =\= My AI powered by GNU/Linux RedHat 7.3


-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
John Hunter
Roman Suzi

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved