HadleyのAMA(海外版「○○だけど何か質問ある?」)を見て気になったとこのメモ

www.reddit.com

適当な訳なので、誤訳とかあると思います。注意。

「A Grammar of Predictive Models」はまだか、という質問に対して

CaffeineJag comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

Yes, but I probably won't get to it until at least 2017 at this point :/

やるよ、でも現時点では少なくとも2017年までは着手しないと思う。

JupyterとかNotebookについての質問に対して

oreo_fanboy comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

It seems like a cool project, and lots of people obviously really like notebooks, but I've never really got the appeal. I think it's because notebooks and rmarkdown/knitr solve a problem that's 90% similar, and once you've internalised one, it's hard to see why you'd want the other.

クールなプロジェクトっぽいし、多くの人がnotebookをほんとに好きみたい。でも、実のところ私は魅力を感じたことはない。それはたぶんnotebookとrmarkdown/knitrが解決する問題の90%は似通っているからで、いったんどちらかを習得してしまうと、もう片方をほしがる理由を見つけるのは難しい。

Big dataについての質問に対して

arifyali comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

I've included my general big data thoughts from a recent interview below. It's hard to give specific advice without knowing more about your data.

ビッグデータに対する一般的な考えなら、最近のインタビューで言った。あなたが言っているデータがどんなものなのか知らないと踏み込んだアドバイスをするのは難しい。

Big data is extremely overhyped and not terribly well defined. Many people think they have big data, when they actually don't. I think there are two particularly important transition points:

ビッグデータは過剰に話が膨らみすぎていて(overhypeのいい訳って難しい…)定義があいまいすぎる。多くの人が、本当はビッグデータじゃないのにビッグデータを扱っていると考えてしまう。この背景には2つの変化があると思う。

1 . From in-memory to disk. If your data fits in memory, it's small data. And these days you can get 1 TB of ram, so even small data is big! Moving from in-memory to on-disk is an important transition because access speeds are so different. You can do quite naive computations on in-memory data and it'll be fast enough. You need to plan (and index) much more with on-disk data

インメモリからディスクという変化。もしデータがメモリに収まるなら、それはスモールデータだ。逆にいうと、最近だと1TBのRAMとかも手に入るから、スモールデータだってバカにならないビッグさだ。インメモリからオンディスクに移行するのは重要な変化だ。なぜなら、メモリとディスクではアクセススピードがとても違うから。インメモリだと、何も考えず計算処理を流しても十分速い。でも、オンディスクのデータだともっとプランを練らないといけない。(インデックスつくったりとかも)

2 . From one computer to many computers. The next important threshold occurs when you data no longer fits on one disk on one computer. Moving to a distributed environment makes computation much more challenging because you don't have all the data needed for a computation in one place. Designing distributed algorithms is much harder, and you're fundamentally limited by the way the data is split up between computers.

ひとつのマシンから複数台のマシンに。次の重要な変化点は、データがひとつのマシンのディスクに収まらなくなる時だ。分散環境への移行は、計算処理をはるかに難しくする。なぜなら、ある計算に必要なデータが一か所にないからだ。分散処理のアルゴリズムを考えるのはもっと難しいし、根本的に、データがどのような分割方式かによって制限を受ける。

I personally believe it's impossible for one system to span from in-memory to on-disk to distributed. R is a fantastic environment for the rapid exploration of in-memory data, but there's no elegant way to scale it to much larger datasets. Hadoop works well when you have thousands of computers, but is incredible slow on just one machine.

個人的には、ひとつのシステムをインメモリからオンディスクに、さらに分散環境に、とスケールさせることは不可能だと考えている。Rはインメモリの処理にはすばらしい環境だが、それをさらに大きなデータセットを扱うようにスケールさせるきれいな方法は存在しない。Hadoopは数千というオーダーのマシンがあればいい感じに動くけど、ひとつのマシン上だと信じられないくらい遅い。

Fortunately, I don't think one system needs to solve all big data problems. To me there are three main classes of problem:

幸運なことに、一つのシステムがすべてのビッグデータ問題を解決する必要はないと思う。私から見るとそれは3つの問題に大別できる。

1 . Big data problems that are actually small data problems, once you have the right subset/sample/summary. Inventing numbers on the spot, I'd say 90% of big data problems fall into this category. To solve this problem you need a distributed database (like hive, impala, teradata etc), and a tool like dplyr to let you rapidly iterate to the right small dataset (which still might be gigabytes in size).

データのサンプリングや要約を正しく行えば実際にはスモールデータの問題にすぎない、というタイプのビッグデータの問題。90%のビッグデータの問題はこのカテゴリにあてはまると思う。これを解決するには、分散データベース(hiveとかimpalaとかteradataとか)と、dplyrのように小さな(とはいってもGB単位にはなるけど)サブセットに繰り返し処理を行えるツールが必要になる。

2 . Big data problems that are actually lots and lots of small data problems, e.g. you need to fit one model per individual for thousands of individuals. I'd say ~9% of big data problems fall into this category. This sort of problem is known as a trivially parallelisable problem and you need some way to distribute computation over multiple machines. The foreach is a nice solution to this problem because it abstracts away the backend, allowing you to focus on the computation, not the details of distributing it.

スモールデータの問題が束になっている、というタイプのビッグデータの問題。たとえば、ひとりひとりにひとつのモデルをつくるとして、その対象が1000人いる場合。~9%のビッグデータの問題は、このカテゴリにあてはまると思う。この種の問題はtrivially paralllelizable problem(Embarassingly parallelとか言うらしい)として知られていて、複数台にまたがる分散処理が必要になる。foreachはいい解決策だ。foreachを使えばバックエンドは抽象化され、分散の細かい部分に気を取られずに計算処理に集中することができる。

3 . Finally, there are irretreviably big problems where you do need all the data, perhaps because you fitting a complex model. An example of this type of problem is recommender systems which really do benefit from lots of data because they need to recognise interactions that occur only rarely. These problems tend to be solved by dedicated systems specifically designed to solve a particular problem.

最後に、すべてのデータが必要な、どうしようもないほどビッグな問題がある。すべてのデータが必要なのはおそらく、複雑なモデルをフィッティングしようとしているからだ。この種の問題の例は、レコメンドシステムだ。レコメンドシステムは、あまり起こらないようなレアケースにも対応する必要があるから、データが大量にあることの恩恵が実際ある。こういう問題は、その個別の問題を解くようにデザインされた専用のシステムによって解決することが多い。

Dirkが怒ってたよ?という質問に対して

you_miami comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

I do get some criticism from Dirk because I promote a certain approach to doing things and I don't tend to talk about the other approaches. This is not unreasonable criticism, and because of my prominence in the community, I do need to be careful about how I position my work relative to others. But generally, my work is aimed at new comers to R and people who are experts in other fields - I don't want to confuse them with a deep discussion of the nuances and alternative approaches. Instead I want to focus on a single way of doing things that I think is most effective for the most number of people.

Dirkから批判されているのは、私があることをやるのに特定のアプローチを勧めるようにしていて、別のアプローチがあることを語ろうとしないことだ。これは根拠のない批判じゃない。私はコミュニティの中で影響力がある立場なので、自分のやっていることを他の人がやっていることに対してどのように位置づけるか注意深くある必要がある。でも、一般的に、私のやっていることはRに新しくくる人や他の分野での専門家の方を向いている。私は、ニュアンスや代替案についての深い議論でそういう人を混乱させたくない。そんなことをしないで、あることをやるのに多くのひとにとって最も効率的なやり方ひとつに私は集中したい。

今後5年間のRについての質問に対して

quitelargeballs comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

I think a big challenge is going to be fighting the big data hype. Not every problem needs big data to solve it, and no big data system will be able to match R's fluidity and power for in-memory data.

ビッグデータの誇大広告と闘うのが一番大きな困難だと思う。すべての問題が、解くのにビッグデータを必要とするわけじゃないし、Rの柔軟性とインメモリデータの扱いの強力さにマッチするビッグデータシステムは存在しない。

どれくらい寝てるの?という質問に対して

smsessio comments on I'm Hadley Wickham, Chief Scientist at RStudio and creator of lots of R packages (incl. ggplot2, dplyr, and devtools). I love R, data analysis/science, visualisation: ask me anything!

About 8 hours a night.

だいたい8時間。

感想

羽鳥でさえも8時間寝てるんだから、ちゃんと寝ましょう!(主にぞうさんに向けたメッセージ)