Author Archives: Hugh E. Williams

About Hugh E. Williams

Search engine guy, Engineer, Executive, Father, and eBay-er.

$27,000. 17 Races. 98 Generous Friends!

I’ve been learning about fundraising by experience, and I now know you should lead with the donation link. So here it is! Head on over and help support my fundraiser: http://igg.me/at/fiftytwofives

A Few Thoughts on the Backstory

Crossing the line in the Bay Breeze 5k

Crossing the line in the Bay Breeze 5k

It’s almost six years since my encounter with Guillain–Barré syndrome began. I remember it well, I doubt anyone who’s had GBS would forget it. I’m happy to have it in the rear vision mirror, and to see it fading into history. I reassure myself that I’ve now got as much chance of getting GBS as anyone who’s never had it.

It took over five years to want to talk about it publicly. In hindsight, I’m not sure why. It’s been cathartic to share the story, and turn a bad experience into a fundraising experience that helps others. Perhaps it was just that talking about it brought it into the forefront of my mind, and it’s an experience I’d have rather forgotten for a while. Anyway, I feel great about doing something good with a bad experience.

Fundraising So Far

Since I began my fundraiser for the GBS/CIDP Foundation, we’ve raised over $27,000. That’s a solid effort for 4 months, but it’s still $25,000 from my goal of $52,000 in 2015. I’ve also managed to run 17 races to raise awareness of GBS and related conditions, about 33% of the way to my goal of 52 races in 2015. Running feels like a fine way to defy GBS, and I’ve heard from more than a few recovered and recovering GBS patients that they like the idea of running as a defiant act.

I maintain a separate blog about my fundraising and racing, and it’s over here at http://fiftytwofives.com. You can read the stories of my races, including my first ever unlikely victory in a race and my crazy time running in Buenos Aires. If you follow the blog, you’ll also get a near-weekly update on my fundraising escapes. If that isn’t enough, Like my page on Facebook, and you’ll get a nearly daily update in your feed.

There’s been some pretty amazing donations. I won’t pick a favorite, but I love the story of Norman Herms of Philadelphia. He mailed a check into the GBS-CIDP Foundation International with the following message: “Please give this check to Hugh Williams. I do not have a computer. I had GBS in 1988 at 55 years old. After 65 hospital days and ten days of therapy I recovered 100%”. That’s a pretty cool story.

Back when

Back when our fundraising began! January 1 in Phoenix, Arizona on a cold morning

All up, 98 people and organizations have contributed to the fundraiser. That includes 3 companies, Pivotal, Accel Partners, and Medallia. I owe them a special thanks for being corporate donors, and I hope other companies will join in too. If you’d like to be part of the story — maybe even our 100th contributor — then you can head over here and donate. There’s some cool perks too, just choose one when you contribute.

See you again soon.

 

Five races down, forty-seven to go…

I’m trying hard to get out the word out about my fundraiser for the GBS/CIDP Foundation. As I shared last week, I suffered from GBS in 2009 — and it was a tough personal experience — and now I’m running to raise awareness of GBS and funds so that the Foundation can help others. (Hopefully, I’m not driving you crazy — this is the first time I’ve attempted a personal fundraiser, and I’m feeling my way — shoot me an email if you have advice to share.)

The view at the Bay Breeze 5k -- race 5 on my way to 52 races in 2015 to raise awareness for GBS

The view at the Bay Breeze 5k — race 5 on my way to 52 races in 2015 to raise awareness for GBS

I learnt this week that three people in my network have been touched by GBS. I’m sure there’s more out there. While it’s estimated in only affects 1 or 2 people in every 100,000, it’s not that hard to find someone who’s personally experienced what it can do. But you have to be looking to find people: the scary thing about GBS is that most people haven’t heard of it (and most medical professionals don’t know the signs), and so it’s incredibly important to raise awareness and to have support from an organization that knows what to do.

Even the name of it is impossible. I had the condition for a few weeks before I could pronounce it properly. For what it’s worth, it’s GHEE-N BAR-A syndrome.

I’m sharing the stories of my 52 races through my Facebook page http://facebook.com/fiftytwofives, and on my fundraising blog fiftytwofives. I just published a new piece on my race yesterday — I hope you enjoy it.

I know you’re all busy, and it’s hard to find time to donate, but I’d really appreciate it if you can find the time and want to help out. I’ve got a long way to go to get to $52k. Head over to http://igg.me/at/fiftytwofives, and I promise it’ll only take 2 or 3 minutes to hand over some cash. Choose a “perk” while you’re there — my favorite is the t-shirt when you donate $100, which will include *your name* on the back as one of my major sponsors.

See you next time.

Guillain–Barré syndrome

I suffered from Guillain–Barré Syndrome (GBS) in 2009.

I am now perfectly healthy, and I’m on a mission to raise money for the GBS/CIDP Foundation. I’m going to do what GBS stopped me doing for a while: running! I’m going to run 52 races this year. Please join me in helping others who suffer from these terrible conditions by doing four things:

  1. Liking my fundraising page on Facebook
  2. Following my fundraising on Twitter @fiftytwofives
  3. Reading my fundraising and running blog at http://fiftytwofives.com
  4. By donating at IndieGogo. Every dollar counts — there’s cool perks available!

Now, here’s the story…

The Short Story

One day in the middle of 2009, I woke up to a tingling sensation in my toes, almost like a cramp that made them feel like they were curling. I was a little dizzy.

Over a couple of days, more strange sensations began in my legs and eventually my arms. My heels went numb, then my toes, and then my calves started tingling and went mostly numb too. I felt strange buzzing sensations in my legs. Walking was awkward. My face started feeling a little numb, and talking felt strange. I suddenly felt exhausted just walking to the mailbox. I was freaked out. Very freaked out.

Late in 2009, a few months after I was diagnosed with GBS. I'm out of shape, but on my way to recovery

Late in 2009, a few months after I was diagnosed with GBS. I’m out of shape, but on my way to recovery

My general practitioner didn’t know what was happening, and sent me to a neurologist.

The neurologist tried some reflex tests. A hammer-hit on the knee did nothing. I normally had good reflexes. I had a few other tests, including getting to know the inside of an MRI machine pretty well. Somewhere around this time, doctors started muttering possible diagnoses such as Multiple Sclerosis. I wouldn’t wish that undiagnosed limbo on anyone.

The next step was a visit to the UCSF Medical Center, where I was finally but quickly diagnosed with Guillain-Barre Syndrome (GBS). While I wasn’t happy to be sick, I was very happy to know what the problem actually was, and to learn more about the condition. I’ll come back to that in a moment.

It was a tough time. My family was in Seattle, and I was in California. I’d just started a new job at eBay. Luckily, eBay was very understanding, and I was able to quietly work part-time for a while. My days went like this: wake up at 8am, feeling exhausted; struggle to make breakfast; slowly get ready (lots of sitting and resting); drive to work; pretend you’re ok for a few hours (while sitting, resting, and feeling strange sensations); go home; struggle to make a meal; sleep for 13 to 15 hours; begin the next day.

What is GBS?

GBS is rare and unusual. It occurs in one to two people per 100,000.

It’s thought that after you’ve had an infection (in my case, probably a viral ear infection), your immune system loses the plot and attacks your nervous system. GBS is otherwise known as Acute Inflammatory Demyelinating Polyneuropathy (AIDP) which gives you clues as to what it does. Acute means it’s not as serious as it could be; chronic is worse. Demyelinating means your immune system strips your peripheral nerves of their myelin, leading to strange sensations and loss of function. Polyneuropathy means it affects many nerves at once. It perhaps should be called Peripheral AIDP since it doesn’t affect your central nervous system (brain and spine): it starts at your feet and works its way up, often taking out your arms.

Serious cases leave people on a respirator and can involve months in hospital. My case wasn’t serious. There’s no cure for GBS – you just wait it out. Doctors often prescribe strong steroids, but there’s no evidence I can find that they help. Blood transfusions can ease the symptoms. Luckily, most people are back to normal within a year or two. Not everyone is that lucky though.

People who’ve suffered from GBS have the same chance of getting it again as those who’ve never had it.

For the Australians out there, you may recall that Alistair Clarkson, the coach of the Hawthorn footy club had GBS in May 2014. He recovered quickly and, of course, coached the Hawks to the flag (championship). Other notable folks who’ve had GBS include Franklin D. Roosevelt, Joseph Heller, Andy Griffith, and Lucky Oceans.

Getting Better

Over the next year, I put on 25+ pounds and became horribly out of shape. There’s no way I could exercise, and I wasn’t in the mood to eat right. I often woke in the night because of numb hands and tingling legs. I was phenomenally tired and easily exhausted. My balance was off, and I became dizzy easily. But I steadily got better – and by mid 2010 was thinking about getting gently back into exercise. Fast forward to today and I’m completely fine.

A recent race. I'm back running, and ready to run 52 races in 2015 to fight GBS

A recent race. I’m back running, and ready to run 52 races in 2015 to fight GBS

I think differently post-GBS. I know that health is the most important thing in the world: without it, you can’t look after your family, let alone work. I spend more time looking after myself, and balancing work and life more effectively. I also think more about people less fortunate than me: having GBS was tough, but my case was mild and there are far worse things that happen to people.

Helping People with GBS

I am turning the tables on GBS, and fundraising for the GBS/CIDP Foundation. I am going to run fifty-two races in 2015, and blog about it over at fiftytwofives.com. The name is inspired from running fifty-two races of 5k in distance — but I will count anything that has a timer as one race (one-milers, 5ks, 10ks, ten-milers, half-marathons. Heck, maybe even a marathon). If you’d like to be part of my fundraising, just head over here to IndieGoGo.

The GBS/CIDP Foundation is doing great work. The foundation helps with education for those suffering GBS and its chronic, recurring cousin CIDP and related conditions. They fund research to understand more about this condition. They lobby to ensure people get access to the health care they need (I’m lucky because I can afford access to great healthcare; of course, not everyone can).

A Quirky Afterword

Next time you have a flu vaccination, take note of the questions you’re asked. Down the bottom, you’ll find “Have you ever suffered from GBS?”. If you answer yes, your doctor probably won’t give you the flu vax – in 1976, after the flu vax was issued, there was roughly twice the incidence of GBS in people who’d had the vax compared to the population that hadn’t. It’s not understood why that happened. And even though they think GBS doesn’t recur, they generally won’t give the flu vax to folks who’ve had GBS.

I didn’t get the flu vax for that reason from 2009 to 2013. However, after I got the flu in 2013, I talked my doctor into giving me the flu vax in 2014. I just got this year’s too. Nothing interesting happened. I’m happy about that.

I thank Sean Southey for encouraging me to share my GBS story.

See you next time.

It’s a Marathon, not a Sprint…

What makes a career successful over the long term? How do you sustain (or even increase) your professional impact, while also deriving meaning and enjoyment from your life? This was the question I set about answering in my talk at StretchCon last week. To see my answers, you can watch the presentation. You can also view the prezi1966321_313990785474109_1977531760847682083_o

The Backstory

I asked eleven colleagues about their success. I chose colleagues who have made it to the C-suite (whether as a CEO, CTO, or another C-level designation) and that appeared to do it with balance between their professional and personal lives. Ten of the eleven responded, and nine of the ten shared thoughts before my deadline. I thank Chris Caren, Adrian Colyer, John Donahoe, Ken Moss, Satya Nadella, Mike Olson, Christopher Payne, Stephanie Tilenius, and Joe Tucci for their help.

I sent each of these colleagues an email that went something like this:

I am speaking about successful careers being about sustained contribution (and not a series of sprints, all-nighters, or unsustainable peaks). Would you be up for giving me a quote I could use and attribute to you? I admire your ability to work hard and smart, while obviously also having a life outside of work.

Their replies were varied, but as you’ll see in the video, there were themes that repeated in their answers. I shared edited quotes in the talk, and promised that I’d share their complete thoughts in my blog. The remainder of this blog is their complete words.

Chris Caren

Chris is the CEO and Chairman of Turnitin. We worked together at Microsoft, and Chris was (and sometimes still is!) my mentor. Here are his thoughts in response to my questions:

My philosophy:  I do my best work when my life is in balance — family, me, and work.  I need a routine of hard work, but no more than 9-10 hours a day, solid exercise daily, low stress (via self-control), 7-8 hours of sleep at a minimum each day, and the time I want with my family and for myself.  When I maintain this balance, I am maximally effective at work — both in terms of quality of thinking and decision making, and maximum output.  More hours worked actually pull down my impact as a CEO.

Adrian Colyer

Adrian was the CTO of SpringSource, the custodians of the Spring Java programming framework. We worked together at Pivotal, where he was the CTO of the Application Fabric team. Recently, Adrian joined Accel Partners as an Executive-in-Residence. Here are Adrian’s thoughts:

A great topic! Maybe the most counter-intuitive lesson I’ve learned over the years is that I can make a much more valuable contribution when I work* less. So work-life balance isn’t really a trade-off as most people normally present it (I have more ‘life’, but sacrifice ‘work’ to get it), it’s actually a way of being better at both life *and* work!

* ‘work’ in the sense that most people would intuitively think of it – frenetic activity.

When I’ve analysed this, I came to realise that when work crowds everything else out I often end up in a very reactive mode. But the biggest and most impactful things you can do – especially as a leader – don’t come about during that constant fire-fighting mode. The vast majority of my important insights and decisions – the things that made the biggest positive impact on the organisations I was working with at the time – have come in the space I’ve made around the busy-ness of the office to actually allow myself the luxury of thinking! Running, cycling, walking and so on have all been very effective for me over the years. But so is just taking some time out in the evening and not necessarily even consciously thinking about work, the brain seems to be very good at background processing! That time has also given space to allow my natural curiosity and love of learning to be indulged. In turn that creates a broader perspective, exposes you to new ideas, and allows you to make connections and insights that you otherwise might not of. All of this feeds back into the work-related decisions and issues you are wrestling with and helps you to make breakthroughs from time to time.

To the extent I’ve been successful over the years, I attribute much of that not to being smarter than the people around me, nor to working ‘harder’, but to creating the space to think.

John Donahoe

John is the CEO of eBay Inc. John was an enthusiastic sponsor of my work while I was there. When I asked John for his thoughts, he sent me a speech he’d recently given to the graduating class at the Stanford Business School. In it, you’ll find John’s thoughts of his professional and personal journey.

Ken Moss

Ken recently became the CTO of Electronic Arts. Prior to that, Ken and I worked together on, off, and on over a period of nine years. Ken was the GM of Microsoft’s MSN Search when I joined Microsoft, and left to found his own company. I managed to help persuade Ken to come to eBay for a few years. Here are Ken’s thoughts:

Always focus on exceeding expectations in the present, while keeping your tank 100% full of gas for the future. There is no quicker way to stall your career than by burning yourself out. I’ve seen many potentially brilliant careers cut short as someone pushed themselves too far past their limits and became bitter under-performers. It’s always in your control.

Satya Nadella

Satya became the CEO of Microsoft at the beginning of 2014. Satya was the VP of the Bing search team at Microsoft for around half the time I was there, and we have stayed in touch since. Here are Satya’s thoughts:

I would say the thing that I am most focused on is to harmonize my work and life vs trying to find the elusive “balance”. Being present in the lives of my family in the moments I am with them is more important than any quantitative view of balance.

Mike Olson

Mike is the Chairman, Chief Strategy Officer, and former CEO of Cloudera. We have interacted during my time at Pivotal, and also during my time at eBay. Mike was kind enough to invite me to give the keynote at Hadoop World in 2011. Here’s Mike’s thoughts:

I have always tried to optimize for interesting — working on problems that are important to me, with people who blow my hair back. The combination has kept me challenged and inspired, and has guaranteed real happiness in the job.

By corollary, you have to be willing to walk away from a good paycheck and fat equity if the work or the people are wrong. Money is cheaper than meaning. I’ve done that a few times. There’s some short-term angst, but it’s paid off in the long term.

Christopher Payne

Christopher is the SVP of the North America business at eBay. Christopher and I have worked on, off, and on for nine years. Christopher was the founding VP of the search team at Microsoft. He left to found his own company, his company was bought by eBay, he hired me to eBay to help run engineering, and he then moved over to run the US and Canadian business teams. Here are Christopher’s thoughts:

I believe strongly in the need to maintain my energy level in order to have the most impact in my career. To do this I find I have to make the time to recharge. For me this means taking walks during the work day, taking all of my vacation, and not being on email 24/7. With my energy level high I find I can be significantly more creative and productive over the long term.

Stephanie Tilenius

Stephanie recently founded her own company, Vida. While she’s spent parts of her career at Kleiner-Perkins, Google, and other places, we met at eBay where we spent around six months working together. Here are Stephanie’s thoughts:

… my point of view is that you have to do something you love, that will sustain you. You also have to know what drives you, what gets you out of bed, for me it is having an impact (for others it may be making money or playing a sport, etc.) You will always be willing to give it your all and you are more likely to innovate if you love what you are doing and constantly growing, challenging the status quo (stagnation is really out of the question, humans don’t thrive on it!). I am committed to my work and to constant innovation but also to having a family and I could not be great at either without the other. They are symbiotic in my mind, they both make me happy and a better person. I have learned it is about integration not necessarily perfect balance. If you integrate life and work, you are much more likely to be successful. The other day my son was out of school early and our nanny had an issue so I brought him to work and he did code academy and talked to some of our engineers. He enjoyed himself and was inspired.

Joe Tucci

Joe is the Chairman of EMC, VMware, and Pivotal, and the CEO of EMC. I met Joe in the interview process at Pivotal, and have worked with him through board and other meetings over the past year. Here’s Joe’s thoughts:

Being a successful CEO is relatively straight forward… 1st – retain, hire, and develop the best talent, 2nd – get these talented individuals to work together as a team (do not tolerate selfishness), 3rd – get this leadership team to embrace a stretch goal that is bigger then any of them imagine they can attain, and 4th – maniacally focus the leadership team on our customers (always striving to exceed their expectations)

I enjoyed giving the talk at Stretch, and interacting with these colleagues in putting it together. I hope you enjoyed it too. See you next time.

A Whirlwind Tour of a Search Engine

Thanks to Krishna Gade and Michael Lopp,  I had an opportunity to speak at Pinterest’s new DiscoverPinterest tech talk series.

I spoke for around 45 minutes, taking the audience on a tour of the world of (mostly) web search — skating across the top of everything from ranking, to infrastructure, to inverted indexing, to query alterations, and more. I had a lot of fun.

Here’s the video:

I also had the chance to listen to four of Pinterest’s engineering leaders discuss their work in browsing, content-based image retrieval, infrastructure, and graph processing and relevance. They’re up to some interesting work — particularly if you’re interested in the intersection of using images, human-curated data, and browsing.

On a social note, it was great to see several of the folks I worked with at Bing. Krishna took a selfie with Yatharth Saraf and I. Those were truly the days — we were in many ways ahead of our time.

Shameless advertisement: if you’d like me to present on search (or anything else) at your organization, please feel free to ask. I have a 30 minute, 1 hour, and whole day tutorial on search engines. I’m also available for consulting and advising!

See you next time.

Measuring Search Relevance

How do you know when you’ve improved the relevance of a search engine? There are many ways to understand this, for example running A/B tests on your website or doing qualitative studies in a lab environment with a few customers. This blog post focuses on using large numbers of human judges to assess search performance.

Relevance Judgment

The process of asking many judges to assess search performance is known as relevance judgment: collecting human judgments on the relevance of search results. The basic task goes like this: you present a judge with a search result, and a search engine query, and you ask the judge to assess how relevant the item is to the query on (say) a four-point scale.

Suppose the query you want to assess is ipod nano 16Gb. Imagine that one of the results is a link to Apple’s page that describes the latest Apple iPod nano 16Gb. A judge might decide that this is a “great result” (which might be, say, our top rating on the four-point scale). They’d then click on a radio button to record their vote and move on to the next task. If the result we showed them was a story about a giraffe, the judge might decide this result is “irrelevant” (say the lowest rating on the four point scale). If it were information about an iPhone, it might be “partially relevant” (say the second-to-lowest), and if it were a review of the latest iPod nano, the judge might say “relevant” (it’s not perfect, but it sure is useful information about an Apple iPod).

The human judgment process itself is subjective, and different people will make different choices. You could argue that a review of the latest iPod nano is a “great result” — maybe you think it’s even better than Apple’s page on the topic. You could also argue that the definitive Apple page isn’t terribly useful in making a buying decision, and you might only rate it as relevant. A judge who knows everything about Apple’s products might make a different decision to someone who’s never owned an digital music player. You get the idea. In practice, judging decisions depend on training, experience, context, knowledge, and quality — it’s an art at best.

There are a few different ways to address subjectivity and get meaningful results. First, you can ask multiple judges to assess the same results to get an average score. Second, you can judge thousands of queries, so that you can compute metrics and be confident statistically that the numbers you see represent true differences in performance between algorithms. Last, you can train your judges carefully, and give them information about what you think relevance means.

Choosing the Task and Running the Judging

You have to decide what queries to judge, how many queries to judge, how many answers to show the judges, and what search engines or algorithms you want to compare. One possible approach to choosing queries is to randomly sample queries from your search engine query logs. You might choose to judge hundreds or thousands of queries. For each query, you might choose to judge the first ten results, and you might choose to compare the first ten results from each of (say) Google, Bing, and DuckDuckGo.

Most search companies do their relevance judgment with crowdsourcing. They put tasks in the public domain, and pay independent people to perform the judgments using services such as CrowdFlower. This does create some problems – some people try to game the system by writing software that randomly answers questions, or they answer fast and erroneously. Search companies have to work constantly on detecting problems, and removing both the poor results and judges from the system. To give you a flavor, one thing search folks do is inject questions where they know what the relevance score should be, and then check that the judges answer most of those correctly (this is known as a ringer test). Another thing folks do is look for judges who consistently answer differently from other judges for the same tasks.

Scoring Relevance Judgments

When you’ve got tens of answers for each query, and you’ve completed judging at least a few hundred queries, you’re ready to compute a metric that allows us to compare algorithms.

An industry favorite is NDCG, Normalized Discounted Cumulative Gain. It sounds complicated, but it’s a common-sense measure. Suppose that on our four-point scale, you give a 0 score for an irrelevant result, 1 for a partially relevant, 2 for relevant, and 3 for perfect. Suppose also that a query is judged by one of the judges, and the first four results that the search engine returns are assessed as relevant, irrelevant, perfect, and relevant by the judge. The cumulative gain after four results is the sum of the scores for each result: 2 + 0 + 3 + 2 = 7. That’s shown in the table below: result position or rank in the first column, the judges score or gain in the second column, and a running total or cumulative gain in the third column.

Rank Judgment (Gain)
Cumulative Gain
1 2 2
2 0 2
3 3 5
4 2 7

Now for the Discounted part in NDCG. Search engine companies know that the first result in the search results is more important than the second, the second more important than the third, and so on. They know this because users click on result one much more than result two, and so on. Moreover, there’s plenty of research that shows users expect search engines to return great results at the top of the page, that they are unlikely to view results low on the page, and that they dislike having to use pagination.

The Discounted part of NDCG adds in a weighting based on position: one simple way to make position one more important than two (and so on) is to sum the score divided by the rank. So, for example, if the third result is ”great”, its contribution is 3 / 3 = 1 (since the score for “great” is 3, and the rank of the result is 3). If “great” were the first result, its contribution would be 3 / 1 = 3. In practice, the score is often divided by the log of the rank, which seems to better match the user perception of relevance. Anyway, for our example and to keep it simple, the Discounted Cumulative Gain (DCG) after four results is 2 / 1 + 0 / 2 + 3 / 3 + 2 / 4 = 3.5. You can see this in the table below: the third column has the discounted gain (the gain divided by the rank), and the fourth column keeps the running total or cumulative gain.

Rank Judgment (Gain)
Discounted Gain Discounted Cumulative Gain (DCG)
1 2 2/1 2
2 0 0/2 2
3 3 3/3 3
4 2 2/4 3.5

The Normalized part in NDCG allows us to compare DCG values between different queries. It’s not fair to compare DCG values across queries because some queries are easier than others: for example, maybe it’s easy to get four perfect results for the query ipod nano, and much harder to get four perfect results for 1968 Porsche 912 targa soft window. If the search engine gets a high score for the easy query, and a poor score for the hard query, it doesn’t mean it’s worse at hard queries – it might just mean the queries have different degrees of difficulties.

Normalization works like this: you figure out what the best possible score is given the results you’ve seen so far. In our previous example, the results scored 2, 0, 3, and 2. The best arrangement of these same results would have been: 3, 2, 2, 0, that is, if the “great” result had been ranked first, followed by the two “relevant” ones, and then the “irrelevant”. This best ranking would have a DCG score of 3 / 1 + 2 / 2 + 2 / 3 + 0 / 4 = 4.67. This is known as the “ideal DCG,” or iDCG.  Our NDCG is the score we got (3.50) divided by the ideal DCG (4.67), or 3.50 / 4.67 = 0.75. Now we can compare scores across queries, since we’re comparing percentages of the best possible arrangements and not the raw scores.

The table below builds out the whole story. You’ve seen the first four columns before. The fifth and sixth columns show what would have happened if the search engine had ordered the results in the perfect order. The seventh and final column shows a running total of the fourth column (the DCG) divided by the sixth column the (ideal or iDCG), and the overall NDCG for our task is shown as 0.75 in bold in the bottom-right corner.

Rank Judgment (Gain)
Discounted Gain Discounted Cumulative Gain (DCG)
Ideal Discounted Gain Ideal Discounted Cumulative Gain (iDCG) Normalized Discounted Cumulative Gain (NDCG)
1 2 2/1 2.0 3/1 3.0 0.67
2 0 0/2 2.0 2/2 4.0 0.5
3 3 3/3 3.0 2/3 4.67 0.64
4 2 2/4 3.5 0/4 4.67 0.75

Comparing Search Systems

Once you’ve computed NDCG values for each query, you can average them across thousands of queries. You can now compare two algorithms or search engines: you take the mean average NDCG values for each system, and check using a statistical test (such as a two sided t-test) whether one algorithm is better than the other, and with what confidence. You might, for example, be able to say with 90% confidence that Google is better than Bing.

As I mentioned at the beginning, this is one important factor you could consider when comparing two algorithms. But there’s more to search engine comparison than comparing NDCG metrics. As I’ve said in previous posts, I’m a huge fan of measuring in many different ways and making decisions with all the data at hand. It takes professional judgment to decide one algorithm is better than another, and that’s part of managing any search engineering effort.

Hope you found this useful, see you next time!

Afterword

I published a first version of this post on eBay’s technical blog in 2010. I owe thanks to Jon Degenhardt for cleaning up a math error, and formatting the tables.

It’s an apostrophe

Even the smartest folks I know can’t get apostrophes right. (Please don’t read all my blog posts and find the mistakes!). Let me see if I can help. 

  • “It’s” is equivalent to “it is”. If you write “it’s” in a sentence, check it makes sense if you replace it with “it is”. If yes, good. If no, you probably meant “its”
  • “Its” is a possessive. “The dog looked at its tail”. As in, the tail attached to the dog was stared at by the aforementioned canine

Get those right, and you’re in the top 98% of apostrophe users.

Don’t write “In the 1980’s, rock music was…”. You mean “In the 1980s, …”. As in, the plural: the ten years that constitute the decade that began in 1980. These are also correct: “He collected LPs” or “She installed LEDs instead of incandescent globes”. You’ll find some people argue about these: for example, some folks write “mind your P’s and Q’s”, and argue correctness. I personally think it’s wrong, there are many Ps and Qs, and so it should be “mind your Ps and Qs”.

Watch out for possession of non-plurals that end in consonants. “Hugh William’s blogs are annoying” and “Hugh Williams’ blogs are annoying” are both wrong. “Hugh Williams’s blogs are annoying” is right (in more ways than one?).

One trick I use is this: if you say the “s”, add the “s”. Hugh Williams’s blog. Ross’s Dad. The boss’s desk. If you don’t say it, don’t add it. His Achilles’ heel. That genres’ meaning.

Have a fun week!