Thursday, February 28, 2013

musical optimization

i never write about music, although i listen to and think about and play it a lot. i hereby inaugurate a new journal tag: music. i'll start with a simple observation: Hindemith is the Nelder-Meade algorithm of music. he starts in what seems like a random place, with chaos and dissonance, and gradually winds inward to a tight, crystalline, consonant solution. supposedly he had a System, an algorithm for generating this kind of music, so i think the optimization problem analogy is apt.

Wednesday, February 27, 2013

now god dammit

i should be working on that blur adaptation paper. i could finish it if i would just put 4-6 hours into it. why am i not doing it? let's ask me.

HAZ, why are you not working on that revision? what is wrong with you? you know what you have to do, so do it. jesus christ. stop procrastinating. you're embarrassing yourself. do it.

do it. do it now. no excuses. there are no excuses. there's nothing more important. do it now.

now

Wednesday, February 20, 2013

pernicious advice?

"Better is the enemy of good enough."

Supposedly this was the motto of the Soviet Admiral Gorshkov. Voltaire had something similar to say, which Gorshkov was probably paraphrasing, and which translates to something more like "The perfect is the enemy of the good".

My mentor in graduate school often repeated this advice, and now with a few years hindsight, I've decided that this is, for a scientist, an especially bad mantra. It lends itself to 'significance seeking', where you collect results until you observe the effect you're looking for, and then stop collecting. If you've got what you want, why keep looking?

Anyways, I just was thinking about this phrase last night, as so many times before I was looking over a developing set of data with some disappointment at an unexpected turnaround in the meaning of the results; I thought to myself, "better is the enemy of good enough", and then I thought, "what? you haven't even finished the experiment yet!".

Point is, avoid mantras and mottos. If you have a hypothesis to test, do it. Choose your stopping point far in advance, and determine that whatever happens, this will be the test of this hypothesis; if you still aren't convinced one way or another after the test, do another one, but don't go thinking that the first one is invalidated somehow. There is no such thing as "good enough".

Friday, February 15, 2013

how to build a psychophysics experiment

You wouldn't know it from my CV (unless you look at the conference presentations), but I've built dozens of psychophysics experiments in my nearly 10 years in the field. I've developed a routine:

1. First, design the planned trial algorithm; how will the stimulus vary from trial to trial? What kind of responses will be collected, and how will they drive the stimulus variation? Staircases and step sizes, interleaved and latticed. In my mind, I always imagine the algorithm as a gear train driving the stimulus presentation, like the mechanism behind the turning hands on a clock. Here, a model observer is usually set up, if I can figure out what one should look like, to help test the algorithm.

2. With the first step still in progress, set up the actual trial loop and use it to test the basics of the stimulus presentation and internal trial structure, with a dummy response. Usually this part is already there, in a previous experiment, so this step usually consists of taking an old experiment and stripping most of the parts out. The trial loop and its internal structure constitute another gear train, really the interface of the experiment: the stimulus and other intervals and features (sounds, fixation points, ISIs), response intervals and valid buttons, and proper timing etc.

3. The trial algorithm should be settling by now. I start to plug it into the trial loop like this: port over the algorithm, but don't connect it to the stimulus train just yet. Instead, start to work out the finer details of the stimulus presentation with the algorithm in mind. That is, if the algorithm is like a set of gears to transmit variation through the stimulus, we have to make sure that the teeth on the stimulus gear mesh with the teeth on the output gear of the algorithm. And, the input gear to the algorithm has to mesh with the response gear. It's easiest to do this, for me, if I first design the algorithm and set it in place so that I can look at it while I finish the design of the interface.

As the algorithm is being set in place, I'll usually simultaneously start setting up the method for writing the data down. This really constitutes a third little mechanism, an output mechanism outside the big algorithm-trial loop, which records everything about the completed trial up to the response, but before the response moves the algorithm train.

4. Finally, the algorithm and the trial structure get linked together, not without a few mistakes, and the whole machine can be tested. Usually it takes a few debugging runs to find all the gears that have been put on backwards, or connected in the wrong place, or left out completely.

I think that these stages, in this order, are what I have been following for at least five years now, and it seems to work pretty well. There are parts of the skeletons of most of my experiments over the past 3 years that are nearly identical; I think that the for V = 1:Trials statement, and the closeout statements at the end of that loop, have survived through a dozen completely different experiments. The other 99% changes, though some parts are common over many different scripts.

Another thing that's constant is the way I feel when I build these things: I really feel like I'm building a machine. It's the same feeling as when I was a kid and I'd take apart a clock or a motor or a fishing reel and try to put it back together, usually failing because I didn't understand at the beginning, when I took it apart, how it actually worked (I became a scientist, not an engineer). But now, since I'm designing it, I can see where the big wheels contain the little wheels, where there are little clusters of gears connected to other clusters, transmitting motion through the whole thing. I can see how exactly the same thing, the same device underlying the experiment, could be built with gear trains and springs and chains and switches and punched tape (for the random trial order). I should make an illustration one of these days...

Anyways, that's how you do it!

Monday, February 11, 2013

random report

random thoughts after a trip home:

politics:I had the idea that you can view different political philosophies by how they respond to (or acknowledge) a certain axiom, that the state is effectively the ultimate master of all people, that any individual is subject in all ways to the power of the government. Fascists acknowledge the axiom and embrace it, they treat the state as a parent and the people as children, and they endeavor to make the state worthy of this status and authority. Anarchists, while they also acknowledge the axiom, view it as the reason that there can be no state, why the state has to be overthrown and dismantled and prevented from recurring. Anarchists will say that people should be their own masters (or not even that), and that no one should ever make himself master of any other. Socialists are the third group that acknowledge the axiom, but they seek to make the state somehow equivalent with the people - through democratic means - so that while it is still true, it becomes unconcerning, since now the people are their own masters, through the mechanism of the state. American libertarians - and the model American political philosophy that is given lip service but not much actual credit - believe that the state has the potential, which has usually been fulfilled, to take on the role of master of all its subjects, but that it can be contained and controlled like a pack animal. I think that Americans in fact, in their popular political system, actually take on aspects simultaneously of socialism and fascism, believing that the state is a function of democracy at the same time that it is - and I think this is a contradiction with the first property - a benevolent external force that requires respect and adoration. The American left and right both take this attitude, but toward different aspects, although in my systematization they are mostly deluded into thinking that they are model Americans, i.e. libertarians. I guess I am closer to a libertarian than anything else, though if there is some label that applies to a half social anarchist half american libertarian, it would mostly cover me (I like NASA and public healthcare and the NIH).

headache: A really irritating headache on Friday, which I think was partly provoked by jumping jacks in the afternoon and magnified by beer in the evening. Two aspirin either did nothing to help or kept it from getting much worse. Not sure this was a migraine, but I think it was. I could feel it mostly above my right eye, and could actually touch it at the supraorbital foramen. By this I mean that by pressing on this spot, I could modulate the main locus of pain; this is a common sort of property of my headaches. This is just one specific branch of the trigeminal nerve, and except for some slight twinge of pain in my right maxilla, I couldn't find any other specific locus. So, I don't know if this qualifies as 'migraine', or if it's actually some sort of ophthalmic nerve neuritis, but just by scanning a google search of 'migraine and trigeminal nerve', you can see that there is thought to be a strong link between migraine pain and over-excitatory dysfunction of neurons in the trigeminal nucleus, so...

Also, had a nice conversation with my aunt about migraine. So along with my mother and her, she says that my grandmother also had headaches, but not my grandfather, so that must be where it comes from.

work/writing: I realized that the project I'm currently working on would be good to divide into two papers: one on the broader aspects of blur adaptation and the connection to contrast adaptation (which I hope to have data on by the end of this week), and the other on the absence of phase-blur adaptation. The latter might make a good PLoS-1 paper.