Migrating to Hugo

For the past 20(?!) years, I’ve run this blog on wordpress, which is overkill for what I need and something of a security risk. Maybe 10+ years ago, wordpress had a security hole where a bunch of spam was being inserted into all of the posts and while cleaning it up, a lot of strange unicode was injected into the site. Anyway, I’m not sure how much blogging I’ll do (maybe some trip photos), but I’m cleaning things up and migrating to a static site that’s generated by Hugo. The general setup is: ...

July 19, 2026 · 2 min · cec

... and logistic regression

A follow-up on the collaborative filter, it occurs to me that it should be possible to add a logistic regression layer in Keras. The following is a regularized multinomial logistic regression model: from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.regularizers import l2 model = Sequential() model.add(Dense(numClasses, input_shape=(numFeatures, ), \ init='zero', W_regularizer=l2(0.01))) model.add(Activation('softmax')) model.compile(loss='binary_crossentropy', optimizer='sgd') As with the collaborative filter, you can easily modify the code to use multiple regularizers and different learning algorithms, say Adamax or adam instead of SGD. ...

March 8, 2016 · 1 min · admin

Collaborative filtering in Keras

Ten years ago, Netflix started the Netflix challenge. A contest to see if the community could come up with a movie recommendation approach that beat their own by 10%. One of the primary modeling techniques that came out of the contest was a set of sparse matrix factoring models whose earliest description can be found at Simon Funk’s website. The basic idea is that the actual ratings of movies for each user can be represented by a matrix, say of users on the rows and movies along the columns. We don’t have the full rating matrix, instead, we have a very sparse set of entries. But if we could factor the rating matrix into two separate matrices, say one that was Users by Latent Factors, and one that was Latent Factors by Movies, then we could find the user’s rating for any movie by taking the dot product of the User row and the Movie column. ...

March 7, 2016 · 3 min · admin

Is this thing on?

Let’s see, it’s been about 5 (?!) years since I’ve written anything here. Since then, I’ve gotten married and nowhave a two year old daughter. My old company was acquired by a large defense contractor, I left a few months ago and I’m now working on machine learning for a medical device company. This space may wind up being used to make machine learning notes to myself.

March 7, 2016 · 1 min · admin

What a week...

The past week has been a series of ups and downs, culminating in the saga for the last half of the week. My car. My Celica. The first new car I ever owned started making a noise on Wednesday. The noise was due to extremely low engine oil (hypothetical question - what’s the point of an oil pressure light if it doesn’t come on until after the car is making noise?). The good folks at Jiffy Lube wouldn’t actually work on the car, but were kind enough to fill up the oil and suggested that I take it to an automotive shop immediately. I called up Wasp Automotive and made an appointment for the next day. I had heard a lot of good things about Wasp and even had that confirmed after I made the appointment. ...

February 19, 2011 · 4 min · admin

Navel gazing - new furniture

So, I’ve been in my apartment for an entire two weeks now. Sadly, it’s been a bit sparse. There’s a bedroom set, a recliner sitting in front of a television which is resting on my stereo. But fortunately, that should all start changing. Yesterday I placed a fairly large furniture order. For the first time in my life, I’m going to have new furniture! Not a hand me down, nothing 20 (30?) years old, but honest to god new furniture. ...

January 18, 2011 · 2 min · admin

Ramadan

My local paper kindly reminds me that tomorrow’s moon rise begins the Muslim holy month of Ramadan and that the associated fasting and prayers begin on Wednesday. Recently, I was talking to my neighbor, the very kind, interesting and extremely conservative Glenn Beck viewer. While we were talking, he brought up Muslims and his fear that they were trying to take over the country (apparently, religious appropriation of a country is only okay if it’s Christian - but that’s another story). According to my neighbor, no religious Muslim could ever possibly be up to any good. I don’t explicitly recall him calling Islam a false religion, but he very much believed that you couldn’t trust “them,” that they were all radicalized and out to destroy “our” way of life. ...

August 9, 2010 · 3 min · admin

The Sounds of Science

Last Friday, hsarik pointed out an interesting web site: Echo Nest. They provide a web service that allows you to analyze and remix music. The API also can provide information (meta-data) about music, artists, songs etc. and has Python bindings. If you’ve seen the “More Cowbell” website where you can upload an mp3 and have more cowbell (and more Christopher Walken) added to it, well that site uses Echo Nest and if you download the python bindings for their API, you can see the script that adds the sounds. Personally, I’m fond of “Ob-la-di, Ob-la-da” with 80% cowbell and 20% Christopher Walken. ...

June 17, 2010 · 3 min · admin

Photography workflow

Four years ago, I made the switch to digital SLR photography. The primary reason was the workflow. When I shot slide film, I would have to get the film developed, look at each image, scan the ones I liked, correct the color balance and then manually remove the dust spots from the scanned images. When I first got the digital camera, the workflow became: auto-correct the color balance using the Nikon’s color profile, then select the images I liked. Great! ...

June 3, 2010 · 3 min · admin

What, ahem, WTF is wrong with Arizona?

Presumably, most people have now heard that Arizona has passed a new law respecting immigration enforcement. Reactions, as one might expect, are mixed depending on one’s thoughts on immigration, and more specifically, the potential for illegal immigration. Mexico has issued a travel warning for its citizens, advising them not to visit the state. Various AZ mayors have decried the law. Some right wingers love it, while others hate it, and of course George Will is still an asshole. And finally, even though the law doesn’t go into effect for another three months or so, we can already see what the future will be like for Hispanics in Arizona. ...

April 28, 2010 · 5 min · admin