字幕表 動画を再生する
Hello, my name is Christian Rudder,
こんにちは、クリスチャン・ラダーと申します。
and I was one of the founders of OK Cupid.
と、OKキューピットの創業者の一人でした。
It's now one of the biggest dating sites in the United States.
今ではアメリカ最大級の出会い系サイトとなっています。
Like almost everyone at the site,
このサイトのほとんどの人と同じように
I was a math major, and, as you might expect,
私は数学を専攻していましたが、さすがに
we're known for the analytic approach
分析的なアプローチで知られる
we have taken to love.
私たちは愛に持っていきました。
We call it our matching algorithm.
これを私たちのマッチング<a href="#post_comment_1">アルゴリズム<i class="icon-star"></i>と呼んでいます。
Basically OK Cupid's matching algorithm helps us decide whether two people should go on a date.
基本的にOKキューピッドのマッチングアルゴリズムは、2人がデートに行くべきかどうかを判断するのに役立ちます。
We built our entire business around it.
私たちはそれを中心に事業全体を構築しました。
Now, algorithm is a fancy word,
さて、アルゴリズムとは何かというと、空想的な言葉です。
and people like to drop it like it's this big thing,
人々はそれが大きなものであるかのようにそれをドロップするのが好きです。
but, really, an algorithm is just a systematic,
しかし、本当に、アルゴリズムはただのシステマティックなものです。
step-by-step way to solve a problem.
問題を解決するためのステップバイステップの方法
It doesn't have to be fancy at all.
派手である必要は全くありません。
Here, in this lesson, I'm going to explain
ここで、このレッスンでは
how we arrived at our particular algorithm
どのようにして特定のアルゴリズムにたどり着いたか
so you can see how it's done.
ということで、どのように行われているのかがわかると思います。
Now, why are algorithms even important?
さて、なぜアルゴリズムが重要なのか?
Why does this lesson even exist?
なぜこの授業が存在するのか?
Well, notice one very significant phrase I used above:
さて、私が上で使った非常に重要なフレーズがあることに気づいてください。
they are a "step-by-step" way to solve a problem,
彼らは問題を解決するための「一歩一歩」の方法です。
and, as you probably know,
と、ご存知の方も多いと思いますが
computers excel at step-by-step processes.
コンピュータは段階的な処理を得意としています。
A computer without an algorithm
アルゴリズムのないコンピュータ
is basically an expensive paperweight.
は基本的に高価な文鎮です。
And since computers are such a pervasive part of everyday life, algorithms are everywhere.
また、コンピュータは<a href="#post_comment_2">普及している<i class="icon-star"></i>日常生活の一部であるため、アルゴリズムはどこにでもあります。
The math behind OK Cupid's matching algorithm
OKキューピッドのマッチングアルゴリズムの裏にある数学
is surprisingly simple.
は意外とシンプルです。
It's just some addition,
ちょっとした足し算です。
multiplication,
掛け算。
a little bit of square roots.
四角い根っこを少しだけ
The tricky part in designing it, though,
デザインのトリッキーな部分もあるけどね。
was figuring out how to take something mysterious,
不思議なものの取り方を考えていました。
human attraction,
人間の魅力。
and break it into components that a computer can work with.
とコンピュータが動作するコンポーネントに分解します。
Well, the first thing we needed to match people up was data,
まず最初に必要だったのはデータですね
something for the algorithm to work with.
アルゴリズムが動作するように
The best way to get data quickly from people
人から素早くデータを取得するための最良の方法
is to just ask for it.
は、ただそれを求めることです。
So, we decided that OK Cupid should ask users questions,
そこで、OKキューピットはユーザーに質問するべきだと判断しました。
stuff like, "Do you want to have kids one day?"
"いつか子供を持ちたい?"とか
and "How often do you brush your teeth?",
とか「歯磨きの頻度は?
"Do you like scary movies?"
"怖い映画は好き?"
and big stuff like "Do you believe in God?"
"神を信じるか?"みたいな大げさなことも
Now, a lot of the questions are good
今は、多くの質問が良い
for matching like with like,
のようなものと似たようなものをマッチングさせるために。
that is when both people answer the same way.
というのは、両方の人が同じように答えている場合です。
For example, two people who are both into scary movies are probably a better match than one person who is and one person who isn't.
例えば、怖い映画にハマっている人とハマっていない人の2人は、ハマっている人とハマっていない人よりも、ハマっている人とハマっていない人の方が相性がいいのかもしれません。
But what about a question like,
でも、こんな質問はどうでしょう。
"Do you like to be the center of attention?"
"注目の的になるのが好きなのか?"
If both people in a relationship are saying yes to this,
交際中の双方がこれにイエスと言っているのであれば
then they are going to have massive problems.
そうなると、大規模な問題を抱えていることになります。
We realized this early on,
早い段階で気付いていました。
and so we decided we needed
必要だと判断しました
a bit more data from each question.
一問一答のデータを少し多めに
We had to ask people to specify not only their own answer,
自分の答えだけでなく、指定してもらう必要がありました。
but the answer they wanted from someone else.
しかし、彼らが求めていた答えは、他の誰かからのものだった。
That worked really well,
それは本当にうまくいった。
but we needed one more dimension.
しかし、私たちはもう一つの次元が必要でした。
Some questions tell you more about a person than others.
質問によっては、他の人よりもその人のことがよくわかるものもあります。
For example, a question about politics, something like,
例えば、政治についての質問、みたいな。
"Which is worse: book burning or flag burning?"
"本を燃やすのと旗を燃やすのはどっちが悪い?"
might reveal more about someone than their taste in movies.
映画の趣味よりも人のことを知ることができるかもしれません。
And it doesn't make sense to weigh all things equally,
そして、すべてのものを平等に重くしても意味がありません。
so we added one final data point.
そこで、最後のデータポイントを1つ追加しました。
For everything that OK Cupid asks you,
OKキューピッドに頼まれたすべてのことに。
you have a chance to tell us
ご意見があれば
the role it plays in your life,
あなたの生活の中で果たす役割
and this ranges from irrelevant to mandatory.
と、これは無関係なものから<a href="#post_comment_3">mandatory<i class="icon-star"></i></a>まであります。
So now, for every question,
さてさて、一問一答につきましては
we have three things for our algorithm:
私たちのアルゴリズムには3つのことがあります。
first, your answer;
まず、あなたの答え。
second, how you want someone else,
第二に、あなたが他の誰かをどのように望んでいるか。
your potential match,
あなたの潜在的なマッチ
to answer;
と答えてください。
and three, how important the question is to you at all.
そして3つ目は、その質問があなたにとってどれだけ重要かということです。
With all this information,
これだけの情報を持って
OK Cupid can figure out how well two people will get along.
OK キューピッドは二人の仲の良さを見極めることができます。
The algorithm crunches the numbers and gives us a result.
アルゴリズム<a href="#post_comment_4">クランチ<i class="icon-star"></i>の数値を計算して結果を出してくれます。
As a practical example,
実例として
let's look at how we'd match you with another person,
他の人との相性を見てみよう
let's call him, "B".
彼を「B」と呼ぼう
Your match percentage with B is based on
Bとのマッチング率は
questions you've both answered.
お二人が答えた質問に
Let's call that set of common questions, "s".
そのよくある質問のセットを「S」と呼んでみましょう。
As a very simple example, we use a small set "s"
非常に簡単な例として、小さな集合 "s "を使用します。
with just two questions in common
ふたつの疑問をもって
and compute a match from that.
からマッチを計算します。
Here are our two example questions.
ここでは、2つの質問例をご紹介します。
The first one, let's say, is, "How messy are you?"
最初の1つ目は、例えば "どんだけ面倒くさいんだよ "って話です。
and the answer possibilities are
と答えの可能性があります。
very messy,
非常に面倒くさい。
average,
平均的なものです。
and very organized.
と非常に整理されています。
And let's say you answered "very organized,"
"非常に整理されている "と答えたとしよう
and you'd like someone else to answer "very organized,"
整理整頓されていると答えて欲しいのか?
and the question is very important to you.
と質問されています。
Basically you are a neat freak.
基本的にお前はニートのキモオタだからな。
You're neat,
あなたはきちんとしている。
you want someone else to be neat,
誰かにニートしてもらいたいのか
and that's it.
と、それだけです。
And let's say B is a little bit different.
そして、Bが少し変わっているとしましょう。
He answered very organized for himself,
自分のために非常に整理された回答をしてくれました。
but average is OK with him
凡人でも良い
as an answer from someone else,
を他の人の答えとして
and the question is only a little important to him.
と、その疑問は彼にとってはほんの少し重要なものでしかありません。
Let's look at the second question,
第二問を見てみましょう。
it's the one from our previous example:
先ほどの例のものです。
"Do you like to be the center of attention?"
"注目の的になるのが好きなのか?"
The answers are just yes and no.
答えはイエスとノーだけです。
Now you've answered "no,"
これで「ノー」と答えたな
how you want someone else to answer is "no,"
いらないものはいらない
and the questions is only a little important to you.
との質問は、あなたにとってほんの少しだけ重要なことです。
Now B, he's answered "yes,"
今Bは「はい」と答えています。
he wants someone else to answer "no,"
駄目だと言っているのではないか
because he wants the spotlight on him,
彼は自分にスポットライトを当てたいからだ
and the question is somewhat important to him.
と、彼にとってはやや重要な質問をしています。
So, let's try to compute all of this.
では、これを全部計算してみましょう。
Our first step is,
私たちの最初の一歩は
since we use computers to do this,
コンピュータを使っているので
we need to assign numerical values
数値を割り当てる必要があります
to ideas like "somewhat important" and "very important"
"やや重要 "や "非常に重要 "のような考えに
because computers need everything in numbers.
なぜなら、コンピュータにはすべてのものが数字で必要だからです。
We at OK Cupid decided on the following scale:
OKキューピットでは、以下のような規模に決定しました。
irrelevant is worth 0,
無関係は0の価値があります。
a little important is worth 1,
少し重要なことは1の価値があります。
somewhat important is worth 10,
やや重要なものは10の価値があります。
very important is 50,
非常に重要なのは50です。
and absolutely mandatory is 250.
と絶対的に必須なのが250です。
Next, the algorithm makes two simple calculations.
次に、アルゴリズムは2つの簡単な計算を行います。
The first is how much did B's answers satisfy you,
1つ目は、Bの回答にどれだけ満足してもらえたかということです。
that is, how many possible points did B score on your scale?
つまり、Bはあなたの尺度で何点の可能性があったのでしょうか?
Well, you indicated that B's answer
あなたが指摘したのは、Bの答えは
to the first question about messiness
最初のごちゃごちゃした質問へ
was very important to you.
は、あなたにとってとても大切なものでした。
It's worth 50 points and B got that right.
50点の価値があるし、Bはそれでいいんじゃないかな。
The second question is worth only 1
2問目は1の価値しかありません。
because you said it was only a little important,
ちょっとしたことが重要だと言っていたからです。
and B got that wrong.
とBが勘違いした。
So B's answers were 50 out of 51 possible points.
ということで、Bの回答は可能性のある51点中50点でした。
That's 98% satisfactory.
98%の満足度ですね。
It's pretty good.
なかなかいい感じです。
And, the second question of the algorithm looks at
そして、アルゴリズムの第二の質問では、次のように見ています。
is how much did you satisfy B.
は、Bをどれだけ満足させたかです。
Well, B placed 1 point on your answer
Bはあなたの答えに1点をつけました
to the messiness question
ごちゃごちゃした質問に
and 10 on your answer to the second.
と2の答えに10をつけてください。
Of those, 11, that's 1 plus 10,
そのうち11は1+10だな
you earned 10,
あなたは10を獲得しました。
you guys satisfied each other on the second question.
2問目でお互いに納得したようですね。
So your answers were 10 out of 11
あなたの答えは11人中10人だったのね
equals 91% satisfactory to B.
Bには91%の満足度に等しい。
That's not bad.
それは悪くない
The final step is to take these two match percentages
最終的には、この2つのマッチ率を取ることで
and get one number for the both of you.
と二人のために1つの番号を取得します。
To do this, the algorithm multiplies your scores,
これを行うには、アルゴリズムはあなたのスコアを乗算します。
then takes the nth root,
は n 番目の根を取ります。
where n is the number of questions.
ここで、nは質問の数です。
Because s, which is the number of questions,
なぜなら、質問の数であるSは
in this sample, is only 2,
は、このサンプルでは、わずか2である。
we have match percentage equals
一致率が等しい
the square root of 98% times 91%.
98%×91%の平方根。
That equals 94%.
それは94%に等しい。
That 94% is your match percentage with B.
その94%はBとの勝率ですね。
It's a mathematical expression
それは数学的な表現で
of how happy you'd be with each other
嬉しさのあまり
based on what we know.
知っていることに基づいて
Now, why does the algorithm multiply as opposed to, say,
さて、なぜアルゴリズムは反対に掛け算をするのでしょうか?
average the two match scores together
あわせる
and do the square-root business?
と四角い商売をするのか?
In general, this formula is called the geometric mean,
一般的には、この式を幾何平均と呼びます。
which is a great way to combine values
という価値観の組み合わせが素晴らしい
that have wide ranges
幅が広い
and represent very different properties.
と非常に異なる特性を表しています。
In other words, it's perfect for romantic matching.
つまり、ロマンティックなお見合いに最適なのです。
You've got wide ranges
幅が広い
and you've got tons of different data points,
膨大な数のデータを持っていて
like I said, about movies,
映画の話をしたように
about politics,
政治について。
about religion,
宗教について。
about everything.
何もかも
Intuitively, too, this makes sense.
直感的にも、これは理にかなっています。
Two people satisfying each other 50%
二人がお互いを満足させる50
should be a better match
方がいい
than two others who satisfy 0 and 100,
0と100を満たす他の2人よりも
because affection needs to be mutual.
なぜなら、愛情はお互いに必要だからです。
After adding a little correction for margin of error,
誤差の補正を少し加えてから
in the case when we have a very small number of questions,
質問数が非常に少ない場合には
like we do in this example,
この例のように
we're good to go.
もう大丈夫だ
Any time OK Cupid matches two people,
いつでもOKキューピッドは二人にマッチします。
it goes through the steps we just outlined.
それは先ほど説明した手順を踏むことになります。
First it collects data about your answers,
まず、あなたの回答に関するデータを収集します。
then it compares your choices and preferences
そして、それはあなたの選択と好みを比較します。
to other people in simple, mathematical ways.
を簡単な数学的な方法で他の人に伝えることができます。
This, the ability to take real world phenomena and make them something a microchip can understand, is, I think, the most important skill anyone can have these days.
これは、現実世界の<a href="#post_comment_5">現象<i class="icon-star"></i>をマイクロチップが理解できるものにする能力であり、最近では誰もが持つことができる最も重要なスキルだと思います。
Like you use sentences to tell a story to a person,
文章を使って相手に伝えるように
you use algorithms to tell a story to a computer.
あなたはアルゴリズムを使ってコンピュータに物語を伝えるために使用します。
If you learn the language,
言葉を覚えれば
you can go out and tell your stories.
外に出て話をすることができます。
I hope this will help you do that.
そのための参考になれば幸いです。