<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>http://samediff.kr/wiki/index.php?action=history&amp;feed=atom&amp;title=Mean_Average_Precision</id>
	<title>Mean Average Precision - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="http://samediff.kr/wiki/index.php?action=history&amp;feed=atom&amp;title=Mean_Average_Precision"/>
	<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;action=history"/>
	<updated>2026-04-26T17:05:13Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=14534&amp;oldid=prev</id>
		<title>2017년 9월 5일 (화) 08:20에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=14534&amp;oldid=prev"/>
		<updated>2017-09-05T08:20:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 9월 5일 (화) 08:20 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot; &gt;14번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;14번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;다음과 같이 나타내기도 하는데, $$\begin{equation}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;다음과 같이 나타내기도 하는데, $$\begin{equation}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\sum \text{precision} \cdot \Delta \text{recall}  \end{equation}$$&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\sum \text{precision} \cdot \Delta \text{recall}  \end{equation}$$&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다&lt;/del&gt;. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;아래와 같이 &lt;/ins&gt;조금 더 섬세하게(?) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;정의하는 수도 있다&lt;/ins&gt;. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 경우는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 경우는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13792&amp;oldid=prev</id>
		<title>2017년 8월 7일 (월) 07:10에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13792&amp;oldid=prev"/>
		<updated>2017-08-07T07:10:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 8월 7일 (월) 07:10 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot; &gt;20번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;20번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mAP@ 뒤에 정수가 아니라 소수가 오는 경우는 다른 뜻이다. image detection에서 IoU(intersection over union)의 면적에 따라 precision이 바뀌는데, 이때 IoU의 기준값을 나타낸 것이다. 예를들어, mAP@0.5라고 하면, \(\text{IoU} \ge 0.5\) 인 것들을 맞다고 하고 precision을 계산한 후 그 평균을 낸 것. &amp;lt;ref&amp;gt;실 사용 예는 [https://arxiv.org/abs/1506.01497 이 논문]의 4.2를 보라. MS COCO는 mAP@[0.5, 0.95]두가지를 쓰고 PASCAL VOC는 mAP@0.5를 쓴다고 한다. &amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;참고: [[CMC]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;참고: [[CMC]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13209&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 07:16에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13209&amp;oldid=prev"/>
		<updated>2017-07-31T07:16:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 07:16 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot; &gt;20번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;20번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;참고: [[CMC]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13204&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:12에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13204&amp;oldid=prev"/>
		<updated>2017-07-31T06:12:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:12 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;16번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;경우(&amp;lt;c&amp;gt;len(actual)&amp;gt;k&amp;lt;/c&amp;gt;)는 &lt;/del&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;경우는 &lt;/ins&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13203&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:12에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13203&amp;oldid=prev"/>
		<updated>2017-07-31T06:12:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:12 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;16번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;경우는 &lt;/del&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;경우(&amp;lt;c&amp;gt;len(actual)&amp;gt;k&amp;lt;/c&amp;gt;)는 &lt;/ins&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13202&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:10에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13202&amp;oldid=prev"/>
		<updated>2017-07-31T06:10:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:10 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;16번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 경우는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다&lt;/del&gt;.&amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;ref&amp;gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&amp;lt;/ref&amp;gt;&lt;/ins&gt;, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 actual의 길이로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;, 즉 auctual의 길이로 나누는 것임에 주의한다. 반대의 경우는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;/ref&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13201&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:09에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13201&amp;oldid=prev"/>
		<updated>2017-07-31T06:09:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:09 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;16번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 &lt;/del&gt;나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;로 &lt;/del&gt;나누는 것임에 주의한다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/ref&amp;gt; &lt;/del&gt;&amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 query를 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째까지 잘랐을 때, 그때까지의 AP이다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;actual의 길이로 &lt;/ins&gt;나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, 즉 auctual의 길이로 &lt;/ins&gt;나누는 것임에 주의한다&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. 반대의 경우는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다&lt;/ins&gt;.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다. &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/ref&amp;gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13200&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:03에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13200&amp;oldid=prev"/>
		<updated>2017-07-31T06:03:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:03 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;16번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;번째 query까지의 AP를 나타낸다&lt;/del&gt;. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;로 나누는 것임에 주의한다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다.&amp;lt;/ref&amp;gt; &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;query를 &lt;/ins&gt;&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;번째까지 잘랐을 때, 그때까지의 AP이다&lt;/ins&gt;. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. 식 \((1)\)에 \(\Delta\text{recall}\)은 이 맥락에서 맞다.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;로 나누는 것임에 주의한다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다.&amp;lt;/ref&amp;gt; &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13199&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 06:01에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13199&amp;oldid=prev"/>
		<updated>2017-07-31T06:01:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 06:01 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;12번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;12번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP도 말 그대로 P의 Average. 단, correct query에 대해서만 계산한다. 위 그림의 Ranking #1에서 \(1 + 1/2 + 2/3 + 2/4 + 2/5 + 3/6 + \cdots\)이 아니고, \(1 + 2/3 + 3/6 + \cdots\)인 이유.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP도 말 그대로 P의 Average. 단, correct query에 대해서만 계산한다. 위 그림의 Ranking #1에서 \(1 + 1/2 + 2/3 + 2/4 + 2/5 + 3/6 + \cdots\)이 아니고, \(1 + 2/3 + 3/6 + \cdots\)인 이유.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;다음과 같이 나타내기도 하는데, $$\sum \text{precision} \cdot \Delta \text{recall} $$&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;다음과 같이 나타내기도 하는데, $$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\begin{equation}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;\sum \text{precision} \cdot \Delta \text{recall&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}  \end{equation&lt;/ins&gt;}$$&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;까지 일반적으로 적용되는 식은 아니어서&amp;lt;ref&amp;gt;recall을 조금 더 섬세하게(?) 정의하면 일반화가 불가능한 것은 아니다. 아래와 같이 정의하면 된다. $$ \text{recall} = \frac{| \{\text{relavant}\} \cap \{\text{retrieved}\} |}{ \min(|\{\text{relavant}\}|, k) } $$&amp;lt;/ref&amp;gt; 혼동의 여지가 있다.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째 query까지의 AP를 나타낸다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;위에 &lt;/del&gt;\(\Delta\text{recall}\)은 이 맥락에서 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;맞는 식이다&lt;/del&gt;.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;로 나누는 것임에 주의한다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다.&amp;lt;/ref&amp;gt; &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AP@&amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;는 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;번째 query까지의 AP를 나타낸다. actual(=answer)의 길이보다 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;가 더 큰 경우(=query의 길이가 더 긴 경우)  query에는 필연적으로 오답이 있을수밖에 없으므로&amp;lt;ref&amp;gt;중복답안이 가능한 경우, 즉 \([1, 1, 1]\)등으로 답을 낼 수 있는 경우, 계산할 때는 처음의 \(1\)만 맞았다고 보고 계산한다. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;식 \((1)\)에 &lt;/ins&gt;\(\Delta\text{recall}\)은 이 맥락에서 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;맞다&lt;/ins&gt;.&amp;lt;/ref&amp;gt;, AP를 계산할 때 &amp;lt;i&amp;gt;k&amp;lt;/i&amp;gt;로 나눈다. 위 그림에서 보면 마치 correct query의 개수로 나누는 듯이 보이지만, &amp;lt;c&amp;gt;min(len(actual), k)&amp;lt;/c&amp;gt;로 나누는 것임에 주의한다.&amp;lt;ref&amp;gt;예를들어, 답이 \([1, 2, 3, 4, 5]\)이고 query가 \([1,6,2,7,8,3,9,10,4,5]\)일 때, AP@\(3\)을 계산하면, \(1 + 2/3\)를 \(2\)로 나누는 것이 아니고 \(3\)으로 나누는 것이다.&amp;lt;/ref&amp;gt; &amp;lt;c&amp;gt;k&amp;lt;/c&amp;gt;는 당연히 prediction(=query)의 길이보다 작거나 같아야 한다.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13198&amp;oldid=prev</id>
		<title>2017년 7월 31일 (월) 05:58에 Admin님의 편집</title>
		<link rel="alternate" type="text/html" href="http://samediff.kr/wiki/index.php?title=Mean_Average_Precision&amp;diff=13198&amp;oldid=prev"/>
		<updated>2017-07-31T05:58:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2017년 7월 31일 (월) 05:58 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot; &gt;18번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;18번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;가장 정확한 이해는 역시 코드를 보는 것인데, [https://github.com/benhamner/Metrics Ben Hamner라는 사람이 만든 테스트코드]를 보면 된다. &amp;lt;ref&amp;gt;[https://github.com/benhamner/Metrics/blob/master/Python/ml_metrics/average_precision.py python코드]&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>