2.X/4. Aggregations

4-09. Significant Terms

drscg 2017. 9. 23. 22:46

he significant_terms (SigTerms) aggregation is rather different from the rest of the aggregations. All the aggregations we have seen so far are essentially simple math operations. By combining the various building blocks, you can build sophisticated aggregations and reports about your data.

significant_terms(SigTerm) aggregation은 다른 aggregation과 다소 다르다. 지금까지 본 모든 aggregation은 본질적으로 간단한 수학 연산이다. 다양한 데이터를 조합하여, 데이터에 대한 복잡한 aggregation과 보고서를 작성할 수 있다.

significant_terms has a different agenda. To some, it may even look a bit like machine learning. The significant_terms aggregation finds uncommonly common terms in your data-set.

significant_terms 는 다른 주제를 가지고 있다. 어떤 이들에게는 기계적인 학습처럼 보인다.significant_terms aggregation은 데이터 집합에서 드물게 흔한(uncommonly common) 단어를 찾는다.

What do we mean by uncommonly common? These are terms that are statistically unusual — data that appears more frequently than the background rate would suggest. These statistical anomalies are usually indicative of something interesting in your data.

드물게 흔한(uncommonly common) 이 무엇을 뜻할까? 이것은 통계적으로 특이한 용어(일반적인 비율 이상으로 더 자주 나타나는 데이터)이다. 이런 통계적 이상(statistical anomalies)은 일반적으로 데이터에서 흥미로운 어떤 것을 보여준다.

For example, imagine you are in charge of detecting and tracking down credit card fraud. Customers call and complain about unusual transactions appearing on their credit card — their account has been compromised. These transactions are just symptoms of a larger problem. Somewhere in the recent past, a merchant has either knowingly stolen the customers' credit card information, or has unknowingly been compromised themselves.

예를 들어, 신용 카드 사기를 추적하는 업무를 맡고 있다고 가정해 보자. 고객은 자신의 신용카드에 나타난 이상한 거래에 대해 전화해서, 불평(자신의 계좌가 노출 되었다고)을 한다. 이런 거래는 실제로 더 큰 문제의 징조일 뿐이다. 최근에 어딘가에서, 어떤 판매자가 고의로 고객의 신용카드 정보를 훔쳤거나, 무의식적으로 노출시켰을 수 있다.

Your job is to find the common point of compromise. If you have 100 customers complaining of unusual transactions, those customers likely share a single merchant—and it is this merchant that is likely the source of blame.

여러분의 업무는 노출의 공통점 을 찾는 것이다. 이상한 거래에 대해 불평하는 100명의 고객이 있고, 어떤 한 명의 판매자가 100명의 고객 모두와 거래했다면, 문제의 원인은 이 상인일 것이다.

Of course, it is a little more nuanced than just finding a merchant that all customers share. For example, many of the customers will have large merchants like Amazon in their recent transaction history. We can rule out Amazon, however, since many uncompromised credit cards also have Amazon as a recent merchant.

물론, 고객 모두와 거래한 판매자를 찾는 것에도, 약간 미묘한 문제가 있다. 예를 들어, 많은 고객들은 그들의 최근 거래 내역에, Amazon 같은 거대한 판매자를 가지고 있을 것이다. 그러나, 정상적인 많은 신용카드는 최근 판매자로 Amazon을 가지고 있기 때문에, Amazon을 배제할 수 있다.

This is an example of a commonly common merchant. Everyone, whether compromised or not, shares the merchant. This makes it of little interest to us.

이것이 일반적으로 흔한(commonly common) 상인의 일례이다. 노출된 사람, 노출되지 않은 사람, 모두는 판매자와 거래한다. 이 사실이 약간 흥미롭다.

On the opposite end of the spectrum, you have tiny merchants such as the corner drug store. These are commonly uncommon—only one or two customers have transactions from the merchant. We can rule these out as well. Since all of the compromised cards did not interact with the merchant, we can be sure it was not to blame for the security breach.

정반대의 상황을 보면, 코너의 약국 같은 소규모 상인이 있다. 이것은 일반적으로 흔하지 않은(commonly uncommon) 이다. 한두 명의 고객만이 판매자와 거래한다. 이들도 마찬가지로 배제한다. 노출된 신용카드 모두는 판매자와 거래하지 않았기 때문에, 보안 위반에 대한 책임은 없다.

What we want are uncommonly common merchants. These are merchants that every compromised card shares, but that are not well represented in the background noise of uncompromised cards. These merchants are statistical anomalies; they appear more frequently than they should. It is highly likely that these uncommonly common merchants are to blame.

우리는 드물게 흔한(uncommonly common) 판매자를 찾고 있다. 이것은 노출된 모든 신용카드와 거래한, 노출되지 않은 신용카드의 일반적인 거래에 나타나지 않는 판매자 이다. 이런 상인은 통계적 이상이다. 그들은 생각했던 것보다 더 자주 나타난다. 이런 드물게 흔한(uncommonly common) 판매자가 책임이 있을 확률이 매우 높다.

significant_terms aggregation does just this. It analyzes your data and finds terms that appear with a frequency that is statistically anomalous compared to the background data.

significant_terms aggregation은 바로 이것을 수행한다. 데이터를 분석하고, 일반적인 데이터에 비해, 통계적으로 이상한 빈도로 나타나는 단어를 찾는다.

What you do with this statistical anomaly depends on the data. With the credit card data, you might be looking for fraud. With ecommerce, you might be looking for an unidentified demographic so you can market to them more efficiently. If you are analyzing logs, you might find one server that throws a certain type of error more often than it should. The applications of significant_terms is nearly endless.

이 통계적 이상을 가지고 _할_ 작업은 데이터에 따라 달라진다. 신용카드 데이터로는 사기꾼을 찾을 수 있다. 전자상거래에서는, 더 효율적인 광고를 위해, 정체 불명의 인구통계를 찾을 수 있다. log를 분석한다면, 특정 서버에서 평상시보다 더 자주 발생하는, 특정 유형의 에러를 찾을 수 있다. significant_terms 의 응용은 거의 무한하다.

'2.X > 4. Aggregations' 카테고리의 다른 글

4-08-1. Finding Distinct Counts  (0) 2017.09.23
4-08-2. Calculating Percentiles  (0) 2017.09.23
4-09-1. significant_terms Demo  (0) 2017.09.23
4-10. Doc Values and Fielddata  (0) 2017.09.23
4-10-1. Doc Values  (0) 2017.09.23