Kyle->GetThoughts();
The Constitution
29 January 2008 @ 01:46 PM MST
Current Music: Blink 182 - Adam's Song
Current Mood: A little bit of everything
I'm behind in my blog writing. I've been meaning to write this entry for a while, but haven't gotten around to it until now. I also have one or two other entries I need to write, maybe they'll show up later today, or tomorrow.

One of the books I got for Christmas was "The Words We Live By" by Linda R. Monk. At the beginning of Fall semester President Samuelson encouraged students to get and read this book so as to have a better understanding of the US Constitution and what it means in our lives. Having not had a history class for many years I also felt it was time to reread the Constitution and pay remembrance to all those liberties we're supposed to have, and awe at the checks and balances that used to exist.

Oddly enough, as I was nearing the end of my foray into Constitutional law my dad sent me a legal brief from the Connecticut Bar Journal entitled, "National Security and the Constitution: A Titanic Collision" by Emanuel Margolis. Having read a hundred or so computer science journal articles diving into a law article was a little hairy as there is a bunch of unfamiliar notation and those crazy lawyers like to use lots of Latin phrases which I have to look up.

I'll move through my reading of the Constitution and return to the journal article in a few minutes.

One of the most noticeable things I noticed about the Constitution, which I keep forgetting, is how short it is. It is not a long document by any means. So much work went into such a short piece of writing. Monk's book provides the original text of the Constitution accompanied by various historical accounts of why certain pieces were written the way they were, legal battles that have occurred over the years as they relate to various sections, and other commentary about the political world. While many touchy topics were covered in the book, including abortion, gay rights, slavery, and foreign policy, Monk makes a concerted effort to remain neutral and simply report what has happened in various court cases. This was appreciated, and necessary for a book on the Constitution, as I've read books that are so obviously biased without apology that I can't read them because they simply feel like propaganda.

One of the main reasons I get so annoyed with politics is because so much of it is just propaganda, but they call it "spin". I've been slowly reading up on the candidates for this year's election, and I'm annoyed by how no one will say anything specific for fear of alienating voters. The only candidate I've seen so far that has talked straight about what he supports, what he opposes, and what he plans to do is Ron Paul, for which I give him much credit. I think the fact that he is a straight shooter is partly why no one has heard of him, from what I can tell he hasn't sold his soul to big businesses, and therefore the media doesn't acknowledge him. I'm not saying I support Paul (I haven't made a decision on that yet), but he has earned my respect for not being afraid to say what he really thinks.

Another point about the Constitution I found intriguing was how much more needlessly verbose the Amendments became as time went on. Many words were spent on defining little details about things, rather than saying what they meant have leaving it to the courts to apply it. I was humored, as I was in high school, by the fact that the later amendments all have a section dedicated to proclaiming Congress's power to enforce the amendment. Isn't that the reason they get to pass it in the first place?



I'll bunch my next set of thoughts in with my reactions to the journal article my dad sent me.

Let's take a look at some of the wording used in the Constitution and its amendments:
The Preamble begins with "We the people" while it has been decided by the courts that the preamble itself has no legal power, this phrase has been hoisted by many groups to obtain a voice in the government: The Civil-Rights movement, Women's Suffrage, slaves, and 18 year old draftees. From my understanding the use of the words "person" and "people" was done carefully in a number of places to prevent the government from restricting the application of the words if instead it had read "citizen(s)". So let's look at a few other places where we find the words "person" and "people":

In Article 1 Section 2 the term "people" is used to determine representation in the government (originally with exceptions for Indians and slaves).
Amendment 1 uses the term "people" to describe those who the government will not strip of the written rights. For comparison Article 4 Section 2 explicitly says "citizens" rather than "persons". "Citizen" is used in Article 3 to describe federal jurisdiction in cases between citizens and states. Article 2 uses "citizen" to describe the requirements for becoming President or Vice President. The use of "person(s)" and "people" is done quite deliberately, and is done in Amendments 1, 2, 4, 5, 9, 10, and 14. Amendments specifically restricting their applicability to "citizens" include 11, 14, 15, 19, 24, and 26. Most of these amendments deal specifically with voting, a right reserved for citizens. The other amendments in the Bill of Rights either don't specify or are written in a manner which makes specification unnecessary. For instance, Amendment 3 refers to the "consent of the Owner", which to me means that it doesn't matter if they are a citizen or not, so long as they own the property.

So where am I going with all this "person(s)", "people", "citizen(s)" stuff? Well, after that last paragraph I think one would have to concede that those amendments using "person(s)" and "people" were meant to apply to everyone, no ifs, ands, or buts. The journal article "National Security and the Constitution: A Titanic Collision", outlines three Supreme Court cases where this sentiment was upheld despite the protests of the Bush administration. The "cute" game President Bush is playing is that by holding "enemy combatants" at Guantanamo Bay they shouldn't be afforded the protections of the Constitution, and pesky little things like the right of the writ of Habeas Corpus which requires the government to give a reason for a person's detention. For some perspective, the requirement to produce a writ of Habeas Corpus allowed Joseph Smith to be freed from prison a number of times. It's not always "bad guys" and "terrorists" that the government locks up. It is this very reason that The Great Writ exists, to protect innocent people from being held in prison indefinitely. To quote Margolis,

"As of March 2007, approximately 385 detainees remained at the U.S. Naval Base [Guantanamo Bay]. Many, if not most, of these detainees have been held for years without charge and with no independent judicial review of their detention."

Some have been there for over 5 years and the government refuses to bring charges against them or even explain why they are being held. The article itself is about 40 pages long and goes into much more detail. The end result is simply this: The Supreme Court says these people must be charged or let go, the Bush administration refuses to comply. These people face life imprisonment with no legal recourse, without ever being told why they are there, without ever being allowed to speak to an attorney, without ever being tried in front of a jury. If the United States is to be anything more than a police state, if we want to continue claim superiority over the countries we conquer, these people need to be protected under the Constitution we pretend to represent. The Presidential oath states, "I will .... preserve, protect and defend the Constitution of the United States." Ignoring all other facets of Bush's failed presidency, this alone is reason enough to remove him from office: to these people, guilty or not, the Constitution has been turned into just a bunch of words that have no meaning. By President Bush's hand the orders were signed authorizing their indefinite detainment. He has failed as a defender of the Constitution, and yet he still sits in the oval office, condemning people to prison for crimes they may or may not have committed.

[This Entry]
sompy: Self-Organizing Maps implemented with scipy
16 January 2008 @ 11:28 AM MST
Current Music: Pandora
Current Mood: Has a cold
** UPDATE Mar 11, 2008:
Fixed a bug in the iterative update code:
sompy_03_11_08.zip
** END UPDATE

** UPDATE Feb 26, 2008:
There is a small bug in the code in that when using batch update you need to normalize the update values by the number of training examples before applying those changes to the nodes. Otherwise you can find yourself in a quickly escalating overcompensation problem.
Here's a fixed version:
sompy_02_26_08.zip
** END UPDATE

** UPDATE Feb 6, 2008:
This new version of the code not only wraps the map around on itself horizontally and vertically (creates a toroidal shape if you picture it three dimensionally), it also has the option (on by default) of growing by inserting a column and row into the location of the most dis-similarity in the map.
Enjoy!
sompy_grow_wrap.zip
** END UPDATE

** UPDATE Feb 1, 2008:
I found a small logic error in the original code, simply a case of improper range values (off by 1). A fixed version of the code is here: sompy_bugfix.zip
** END UPDATE

After diving into the code of SOMPython written by Paras Chopra I decided that I needed it to be more efficient for the heavy duty processing I need to do. So I started from scratch and wrote a Self-Organizing Map implementation in Python which uses scipy to do all the heavy lifting: sompy. This implementation runs about 80% faster than the enhanced version in my previous blog post.

To test my new implementation I included code that uses the Python Imaging Library (PIL) to output the result of training a map using 8 colors.

First we initialize the map randomly:
initial map

Then we begin feeding it color examples. After 50 iterations through the 8 colors we get:
map after 50 iterations

After 500 iterations:
map after 500 iterations

And after 2000 iterations:
map after 2000 iterations

This is using a 32x32 map (images uses Nearest Neighbor interpolation to produce 320x320 images). I think I'll be playing with the learning rate and neighborhood decay functions though. I think the current functions start out too slowly and then decay too rapidly. I may use a linear decay instead of the exponential decay.

I am releasing this code under the GNU GPL. All I ask in addition to that license is that you send me an email (my email address is in the source code) if you use the code for anything, just for my curiosity.

[This Entry]
SOMPython: Self-Organizing Maps in Python
15 January 2008 @ 11:58 AM MST
Current Music: Pandora
Current Mood: Productive
I'm looking into using self-organizing maps for my thesis work, so I found a basic implementation of SOMs in Python which was written by Paras Chopra.

I've made some enhancements which I've sent back to Paras, and am also hosting the enhanced file here:
Enhanced SOMPython. The enhancements include ~13% speedup, a few bug fixes, and various items of code cleanup.

The file includes a self-test which shows off using the SOM to learn the XOR function.

Enjoy.

[This Entry]
Undergrad courses are lame
9 January 2008 @ 03:09 PM MST
Current Music: Pandora
Current Mood: Meh
So, today was my first day of classes (as I missed classes on Monday). I had the epiphany that undergraduate courses are incredibly lame. Stuck in a room with about 20-30 people: ~10% aren't particularly bright bulbs and slow the class down and 20% feel the need to make inane comments that contribute nothing and slow the class down. It was the second day of class and neither class discussed anything beyond overview type work. I miss my grad courses of last semester where the first day we dove into the topics. It also doesn't help that for both classes this semester (Digital Signals Processing and Computer Security) I've done extensive work on my own and am well ahead of 95% of the students there. Heck I was writing encryption programs in 9th grade, so the first lab for Security (Implement the AES [Advanced Encryption Standard] cipher) is going to be a breeze.

Oh well, it will be a light semester, and I'm not TA-ing, so I should have lots of time to work on my thesis.

[This Entry]
Airport Security
7 January 2008 @ 02:38 PM MST
Current Music: None
Current Mood: Bleh
So I've arrived back in Provo and I had some observations about the uselessness of airport security, and the annoying-ness caused by it.

1: Don't get mad at me for not taking my Wii out like a laptop, none of the signs, pictures, videos, or auditory messages tell you this might be necessary.

2: Security procedures attempting to prevent people from bringing dangerous objects onto the plane are completely negated when workers leave items such as crowbars, box cutters, grout scrapers, and other pointy or heavy things unattended and unwatched in the "secure" area of the terminal.

3: I bet there are chemicals on the bathroom cleaning cart that could cause some damage if sprayed in the face. The guy pushing around the bathroom cleaning cart didn't look like he was batting more than about .050.

4: The TSA no longer notifies you with a little paper when they go through your suitcase. I know this because my carefully-arranged-to-prevent-damage-to-items suitcase was rearranged in a suboptimal way when I opened it a few minutes ago.

Driving would almost be worth it to not have to deal with stupid and largely ineffective security measures.

[This Entry]