Probabilistic Data Structures for Web Analytics and Data Mining 이런 훌륭한 글이 있군요. 위 글은 많은 양의 데이터에서 각 아이템의 출현횟수를 세거나 unique 아이템의 수가 몇개인지 세거나 하는 방법들입니다. 예를들어 integer가 엄청나게 많을때 각 값의 출현횟수 세기같은 경우죠. 간단하게 관심가는 것들, 기본적인 내용으로 정리해봅니다. 1. 입력에 몇개의 unique한 수가 있는지 세기(Cardinality Esitmation): Linear Counting m [...]
¶
Posted 17 March 2013
§
‡
°
http://curriq.com/course/73 ktug 링크가 죽어있는 것 같아서 정리된 내용을 찾아 올려둡니다.
¶
Posted 17 February 2013
§
‡
°
http://blog.notdot.net/2012/09/Dam-Cool-Algorithms-Cardinality-Estimation HyperLogLog 라고 하는 알고리즘. 셋이 주어지면 아이템들의 해시값을 구한 뒤 해시값의 맨 앞에서 연속적으로 나타난 0의 최대 갯수를 세고, 이로부터 전체 unique 데이터 갯수를 알아냅니다. 예를들어 해시함수의 출력이 m자리 이진수라고 해보죠. n개 수를 해싱했더니 나온 n개 해시값들중에서 연속된 0이 가장 길게 나온경우는 세자리였다고 해보겠습니다. 연속적으로 0이 3자리 나오는건 약 2^3개의 엘리먼트를 볼때마다이므로 unique item [...]
¶
Posted 22 December 2012
§
‡
°
논의하고 싶은 상황은 예를들면 아래와 같은 경우입니다. foo()는 Klass을 반환해야할까요 아니면 const Klass&을 반환해야할까요? const Klass& 형태의 리턴을 원하는 까닭은 당연하게도 퍼포먼스입니다. 그러나 Klass을 반환해야하는 이유는 더 많습니다. const reference가 아니라 value를 반환해야하는 이유 만약 foo()의 구현이 내부에서 복잡한 연산을 한다음 Klass를 리턴하는 것이라면 Klass 복사하는 것을 없애는 것이 전체 실행시간에 큰 영향이 없습니다. 특히 [...]
¶
Posted 25 November 2012
§
‡
°
After installing mysql51 and mysql51-server using macports, we need to make it secure by running /local/lib/mysql51/bin/mysql_secure_installation. But before that, as default installation does not set root password, root password should be set first: And then run mysql_secure_installation. Here’s how to start and stop mysql: ‘mysqlstop’ needs you to enter mysql root’s password. If that’s annoying, [...]
¶
Posted 01 September 2012
§
‡
°
Topic sensitive pagerank is a way of getting pageranks per topic instead of using just one pagerank for all pages. In the book Mining of Massive Datasets, biased random walk algorithm is introduced. In the algorithm, we let the random surfer jumps to the page with the specific topic when it wants to teleport. That [...]
¶
Posted 22 August 2012
§
‡
°
요즘 늘어난 cpu 코어를 충분히 활용해보고자 멀티 프로세스, 멀티 쓰레드로 애플리케이션을 종종 돌리고 있습니다. 그런데 top 은 이럴때 시스템 전반의 상황을 쉽게 보기가 어렵더군요. 그래서 찾아보니 htop이란게 있네요. http://htop.sourceforge.net/에서 더 많은 스크린샷을 볼 수 있고, OSX라면 macports로 설치가능합니다. 안해봤지만 리눅스에서도 yum이나 apt-get으로도 쉽게 설치가능할 것입니다. 장점은 기본 동작이 코어별로 cpu load를 보여주는 것이고, top보다는 기본으로 [...]
¶
Posted 25 July 2012
§
‡
°
어쩌다보니 screen대신 이걸 쓰게 되었네요.
¶
Posted 14 July 2012
§
‡
°
Java7 introduced interesting framework called fork join. It’s a mapreduce like lightweight parallel programming library. The basic idea is to split the work into multiple small parts. Process them, and merge the results into final return value. I’ve written a sample code that computes sum of integers in ArrayList: Fork-Join framework is interesting in some [...]
¶
Posted 12 May 2012
§
‡
°
This is the follow up on the previous article: modern password hashing. In case you didn’t read it, bcrypt is slow hashing algorithm which is not vulnerable to rainbow table as it has built-in salt. Also, as it can be slowed down as much as you want, it can’t be broken even if computers get [...]
¶
Posted 07 April 2012
§
‡
°