[PYTHON MATRIX-SIG] Some thoughts on default axes.

tim@lassi.ece.uiuc.edu tim@lassi.ece.uiuc.edu
Sun, 25 Aug 1996 21:20:38 -0500


Following up on my last post (again) about distinguishing structural
operations from non-structural operations based on their parts of
speach. I did some research into how well this would work.

I sent my proposal to a friend with no knowledge of Python and asked
him to sort the NumPy operations into structural and non-structural
operations based on the rule in my proposal:

>Proposal: All structural operation names will be present tense verbs
>(e.g., run, walk, skip; not walked, tree, overThere). The names of
>sort, and argSort will be changed to sorted and argSorted since sort
>is both a verb and a noun.

The results were a disaster! Both my rule and the names of the
operations were much more ambiguous than I had suspected. (There are
far too many words that are both verbs and nouns...). 

I did some fine tuning of the rule, and made some changes to the names
of some operations. I then repeated my experiment with two more
individuals. This time I had more success. Between the two of them
only one operation was identified wrongly (reduceAt) and it was
misidentified only one. Once again these individuals had no prior
knowledge on Numerical Python (or Python for that matter).

My conclusion is that this would probably be a viable way to
distinguish between structural and non-structural operations. Here are
some possible areas of concern:

o	The rule is might be too complicated to remember (I don't
	think so, but I've been looking at it too much to know.)
o	Esthetics (again). 

Below is the rule and list of operation names that I sent out. I've
marked the changed operation names with *s.  A (clumsily worded)
mnemonic for this set of rules is 'Structural operations ACT
(->p.t. verb phrases) on the structure the matrix,, while
non-structural operations return OBJECTS (->other phrases) derived
from the matrix.'

What do people think of this? Does this make it sufficently easy to
determine which kind of operation each name corresponds to? Is fftOf
too ugly to live? Also, do people agree or disagree with the way I've
reassigned the default axes/diagonals of trace, diagonal, and product
and its ilk?

>o	Structural operation names are be present tense verbs phrases
>	such as walk, runOver, fly.
>o	Non-Structural operation names are all other phrases (e.g.,
>	car, walkedOn). 
>o	If a word is both a noun and a verb treat it as a verb.
>
>Which of the following are structural and which are non-structural:
>(Just tack on a NSO or SO after each operation name).
>
>allTrue    	
>sorted		*
>diagonal 	
>cumProduct 	
>concatenate 	
>dotProd	* 	
>take 		
>argSorted	*
>repeat 	
>choose 	
>reduce 	
>someTrue 	
>summation 	*
>accumulate 	
>product 	
>traceOf 	*
>reduceAt	
>compress 	
>cumSummation 	*
>fftOf		*
>			
>(cum stands for cummulative)



-- 
	-tim

+--------------------------------------------------------------------+
| Tim Hochberg               Ultrahigh Speed Digital Electronics Lab |
| tim@lassi.ece.uiuc.edu              University of Illinois         |
| http://dogbert.ece.uiuc.edu/~tim         (217) 333-6014            |
+--------------------------------------------------------------------+

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================