A A
[ํ˜ผ๊ณต๋จธ์‹ ] Clustering Algoritm (๊ตฐ์ง‘ ์•Œ๊ณ ๋ฆฌ์ฆ˜)

Target์„ ๋ชจ๋ฅด๋Š” Unsupervised Learning(๋น„์ง€๋„ ํ•™์Šต)

Target์„ ๋ชจ๋กœ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ข…๋ฅ˜๋ณ„๋กœ ๋ถ„๋ฅ˜ํ•˜๋ ค๊ณ  ํ• ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ML ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฐ”๋กœ Unsuperivsed Learning (๋น„์ง€๋„ ํ•™์Šต) ์ž…๋‹ˆ๋‹ค.

 

์‚ฌ๋žŒ์ด ์•Œ๋ ค์ฃผ์ง€ ์•Š์•„๋„, ๋ฐ์ดํ„ฐ์— ์žˆ๋Š” ๋ฌด์–ธ๊ฐ€๋ฅผ ํ•™์Šตํ•˜๋Š” ๋ฐฉ์‹์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ํŽธํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋ฉด ํ•œ๋ฒˆ ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.


Data ์ค€๋น„ํ•˜๊ธฐ

์‚ฌ๊ณผ, ๋ฐ”๋‚˜๋‚˜, ํŒŒ์ธ์• ํ”Œ๋กœ ๊ตฌ์„ฑ๋œ ํ‘์ƒ‰ ์‚ฌ์ง„์˜ ๊ณผ์ผ ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.
!wget https://bit.ly/fruits_300_data -O fruits_300.npy
--2023-07-16 14:21:20--  https://bit.ly/fruits_300_data
Resolving bit.ly (bit.ly)... 67.199.248.10, 67.199.248.11
Connecting to bit.ly (bit.ly)|67.199.248.10|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/rickiepark/hg-mldl/raw/master/fruits_300.npy [following]
--2023-07-16 14:21:20--  https://github.com/rickiepark/hg-mldl/raw/master/fruits_300.npy
Resolving github.com (github.com)... 20.27.177.113
Connecting to github.com (github.com)|20.27.177.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/rickiepark/hg-mldl/master/fruits_300.npy [following]
--2023-07-16 14:21:21--  https://raw.githubusercontent.com/rickiepark/hg-mldl/master/fruits_300.npy
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3000128 (2.9M) [application/octet-stream]
Saving to: ‘fruits_300.npy’

fruits_300.npy      100%[===================>]   2.86M  --.-KB/s    in 0.08s   

2023-07-16 14:21:21 (36.4 MB/s) - ‘fruits_300.npy’ saved [3000128/3000128]

 

์ด์ œ ๋‹ค์šด๋กœ๋“œํ•œ ํŒŒ์ผ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ํ•œ๋ฒˆ ๋กœ๋“œํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

import numpy as np
import matplotlib.pyplot as plt

 

Numpy์—์„œ .npy ํ˜•์‹์˜ ํŒŒ์ผ์„ import ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ load() Method์— ํŒŒ์ผ์ด๋ฆ„์„ ์ „๋‹ฌํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

fruits = np.load('fruits_300.npy')

print(fruits.shape)
# (300, 100, 100)

 

Data์˜ ์ฐจ์›์„ ํ•œ๋ฒˆ ํ™•์ธํ•ด๋ณด๋ฉด, ์ฒซ๋ฒˆ์งธ ์ฐจ์›์˜ 300์€ ์ƒ˜ํ”Œ์˜ ๊ฐœ์ˆ˜, ๋‘๋ฒˆ์งธ ์ฐจ์› 100์€ ์ด๋ฏธ์ง€์˜ ๋†’์ด, ์„ธ๋ฒˆ์งธ ์ฐจ์› 100์€ ์ด๋ฏธ์ง€์˜ ๋„“์ด ์ž…๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋Š” 100x100์ž…๋‹ˆ๋‹ค. ๊ฐ ํ”ฝ์…€์€ Numpy Array์˜ ์›์†Œ ํ•˜๋‚˜์— ๋Œ€์‘ํ•ฉ๋‹ˆ๋‹ค.

 

ํ•œ๋ฒˆ ์ฒซ๋ฒˆ์งธ ์ด๋ฏธ์ง€์˜ ์ฒซ๋ฒˆ์งธ ํ–‰์„ ํ•œ๋ฒˆ ์ถœ๋ ฅํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

3์ฐจ์› ๋ฐฐ์—ด์ด๋ฏ€๋กœ, ์ฒ˜์Œ 2๊ฐœ์˜ index๋Š” 0์œผ๋กœ ์ง€์ •ํ•˜๊ณ , ๋งˆ์ง€๋ง‰ index๋Š” ์ง€์ •ํ•˜์ง€ ์•Š๊ฑฐ๋‚˜ slicing ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ฒซ๋ฒˆ์งธ ์ด๋ฏธ์ง€์˜ ์ฒซ๋ฒˆ์งธ ํ–‰์„ ๋ชจ๋‘ ์„ ํƒ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

print(fruits[0, 0, :])
[  1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   2   1
   2   2   2   2   2   2   1   1   1   1   1   1   1   1   2   3   2   1
   2   1   1   1   1   2   1   3   2   1   3   1   4   1   2   5   5   5
  19 148 192 117  28   1   1   2   1   4   1   1   3   1   1   1   1   1
   2   2   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
   1   1   1   1   1   1   1   1   1   1]

 

์ฒซ๋ฒˆ์งธ ํ–‰์—์žˆ๋Š” ๋„˜ํŒŒ์ด ๋ฐฐ์—ด์— ๋‹ด๊ธด ํ‘๋ฐฑ ์ด๋ฏธ์ง€์˜ ์ฒซ ๋ฒˆ์งธ ํ–‰์— ์žˆ๋Š” 100๊ฐœ์˜ ํ”ฝ์…€ ๊ฐ’์„ ์ถœ๋ ฅํ•œ ํ›„, ์ด๋ฅผ ์ด๋ฏธ์ง€์™€ ๋น„๊ตํ•ด ์„ค๋ช…ํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด Matplotlib์˜ imshow() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ๊ทธ๋ ค์„œ ๋น„๊ตํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

ํ‘๋ฐฑ ์ด๋ฏธ์ง€์ด๋ฏ€๋กœ cmap ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ 'gray'๋กœ ์ง€์ •ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

 

plt.imshow(fruits[0], cmap='gray')
plt.show()

 

์ฒซ ๋ฒˆ์งธ ์ด๋ฏธ์ง€๋Š” ์‚ฌ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์˜ ๊ทธ๋ฆผ์ฒ˜๋Ÿผ ์ฒซ ๋ฒˆ์งธ ํ–‰์ด ์œ„์—์„œ ์ถœ๋ ฅํ•œ ๋ฐฐ์—ด ๊ฐ’์— ํ•ด๋‹นํ•ฉ๋‹ˆ๋‹ค. 0์— ๊ฐ€๊นŒ์šธ์ˆ˜๋ก ๊ฒ€๊ฒŒ ๋‚˜ํƒ€๋‚˜๊ณ  ๋†’์€ ๊ฐ’์€ ๋ฐ๊ฒŒ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ๋ณดํ†ต ํ‘๋ฐฑ ์ƒ˜ํ”Œ ์ด๋ฏธ์ง€๋Š” ๋ฐ”ํƒ•์ด ๋ฐ๊ณ  ๋ฌผ์ฒด(์—ฌ๊ธฐ์„œ๋Š” ์‚ฌ๊ณผ)๊ฐ€ ์ง™์€์ƒ‰์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์™œ ์ด๋ ‡๊ฒŒ ๋ณด์ผ๊นŒ์š”?

 

์ด ํ‘๋ฐฑ ์ด๋ฏธ์ง€๋Š” ์‚ฌ์ง„์œผ๋กœ ์ฐ์€ ์ด๋ฏธ์ง€๋ฅผ ๋„˜ํŒŒ์ด ๋ฐฐ์—ด๋กœ ๋ณ€ํ™˜ํ•  ๋•Œ ๋ฐ˜์ „์‹œํ‚จ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์‚ฌ์ง„์˜ ํฐ ๋ฐ”ํƒ•(๋†’์€ ๊ฐ’)์€ ๊ฒ€์€์ƒ‰(๋‚ฎ์€ ๊ฐ’)์œผ๋กœ ๋งŒ๋“ค๊ณ  ์‹ค์ œ ์‚ฌ๊ณผ๊ฐ€ ์žˆ์–ด ์ง™์€ ๋ถ€๋ถ„(๋‚ฎ์€ ๊ฐ’)์€ ๋ฐ์€ ์ƒ‰(๋†’์€ ๊ฐ’)์œผ๋กœ ๋ฐ”๊พธ์—ˆ์Šต๋‹ˆ๋‹ค. ์™œ ์ด๋ ‡๊ฒŒ ๋ฐ”๊พธ์—ˆ์„๊นŒ์š”?

 

์—ฌ๊ธฐ์„œ ๊ด€์‹ฌ ๋Œ€์ƒ์€ ๋ฐ”ํƒ•์ด ์•„๋‹ˆ๋ผ ์‚ฌ๊ณผ์ž…๋‹ˆ๋‹ค. ํฐ์ƒ‰ ๋ฐ”ํƒ•์€ ์šฐ๋ฆฌ์—๊ฒŒ ์ค‘์š”ํ•˜์ง€ ์•Š์ง€๋งŒ ์ปดํ“จํ„ฐ๋Š” 255์— ๊ฐ€๊นŒ์šด ๋ฐ”ํƒ•์— ์ง‘์ค‘ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ ๋ฐ”ํƒ•์„ ๊ฒ€๊ฒŒ ๋งŒ๋“ค๊ณ  ์‚ฌ์ง„์— ์ง™๊ฒŒ ๋‚˜์˜จ ์‚ฌ๊ณผ๋ฅผ ๋ฐ์€ ์ƒ‰์œผ๋กœ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

 

์ปดํ“จํ„ฐ๊ฐ€ 255์— ๊ฐ€๊นŒ์šด ๋ฐ”ํƒ•์— ์ง‘์ค‘ํ•˜๋Š” ์ด์œ : ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์–ด๋– ํ•œ ์ถœ๋ ฅ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด ๊ณฑ์…ˆ, ๋ง์…ˆ์„ ํ•ฉ๋‹ˆ๋‹ค.
ํ”ฝ์…€๊ฐ’์ด 0์ด๋ฉด ์ถœ๋ ฅ๋„ 0์ด ๋˜์–ด ์˜๋ฏธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ํ”ฝ์…€๊ฐ’์ด ๋†’์œผ๋ฉด ์ถœ๋ ฅ๊ฐ’๋„ ์ปค์ง€๊ธฐ ๋•Œ๋ฌธ์— ์˜๋ฏธ๋ฅผ ๋ถ€์—ฌํ•˜๊ธฐ ์ข‹์Šต๋‹ˆ๋‹ค.

 

์‚ฌ๋žŒ์˜ ์‹œ์„ ์œผ๋กœ ๋ณด๋Š” ๊ฒƒ๊ณผ ์ปดํ“จํ„ฐ๊ฐ€ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ์‹์ด ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์— ์ข…์ข… ํ‘๋ฐฑ ์ด๋ฏธ์ง€๋ฅผ ์ด๋ ‡๊ฒŒ ๋ฐ˜์ „ํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

๊ด€์‹ฌ ๋Œ€์ƒ์˜ ์˜์—ญ์„ ๋†’์€ ๊ฐ’์œผ๋กœ ๋ฐ”๊พธ์—ˆ์ง€๋งŒ Matplotlib์œผ๋กœ ์ถœ๋ ฅํ•  ๋•Œ ๋ฐ”ํƒ•์ด ๊ฒ€๊ฒŒ ๋‚˜์˜ค๋ฏ€๋กœ ๋ณด๊ธฐ์—๋Š” ์ฉ ์ข‹์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

cmap ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ gray_r๋กœ ์ง€์ •ํ•˜๋ฉด ๋‹ค์‹œ ๋ฐ˜์ „ํ•˜์—ฌ ์šฐ๋ฆฌ ๋ˆˆ์— ๋ณด๊ธฐ ์ข‹๊ฒŒ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.

plt.imshow(fruits[0], cmap='gray_r')
plt.show()

 

 

์ด ๋ฐ์ดํ„ฐ๋Š” ์‚ฌ๊ณผ, ๋ฐ”๋‚˜๋‚˜, ํŒŒ์ธ์• ํ”Œ ์ด๋ฏธ์ง€๊ฐ€ ๊ฐ๊ฐ 100๊ฐœ์”ฉ ๋“ค์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋‚˜๋‚˜์™€ ํŒŒ์ธ์• ํ”Œ ์ด๋ฏธ์ง€๋„ ์ถœ๋ ฅํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

 

Matplotlib์˜ subplots() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๊ทธ๋ž˜ํ”„๋ฅผ ๋ฐฐ์—ด์ฒ˜๋Ÿผ ์Œ“์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. subplots() ํ•จ์ˆ˜์˜ ๋‘ ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” ๊ทธ๋ž˜ํ”„๋ฅผ ์Œ“์„ ํ–‰๊ณผ ์—ด์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ๋Š” subplots(1, 3)์ฒ˜๋Ÿผ ํ•˜๋‚˜์˜ ํ–‰๊ณผ 3๊ฐœ์˜ ์—ด์„ ์ง€์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

 

๋ฐ˜ํ™˜๋œ axs๋Š” 3๊ฐœ์˜ ์„œ๋ธŒ๊ทธ๋ž˜ํ”„๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค. axs[0]์— ์‚ฌ๊ณผ ์ด๋ฏธ์ง€๋ฅผ, axs[1]์— ํŒŒ์ธ์• ํ”Œ ์ด๋ฏธ์ง€๋ฅผ, axs[2]์— ๋ฐ”๋‚˜๋‚˜ ์ด๋ฏธ์ง€๋ฅผ ๊ทธ๋ ธ์Šต๋‹ˆ๋‹ค. ์ด์žฅ์—์„œ subplots()๋ฅผ ์‚ฌ์šฉํ•ด ํ•œ๋ฒˆ์— ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ด๋ฏธ์ง€๋ฅผ ๊ทธ๋ ค๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

fig, axs = plt.subplots(1, 2)
axs[0].imshow(fruits[100], cmap='gray_r')
axs[1].imshow(fruits[200], cmap='gray_r')
plt.show()

 


Pixel๊ฐ’ ๋ถ„์„ํ•˜๊ธฐ

๋„˜ํŒŒ์ด ๋ฐฐ์—ด์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜๋กœ ๊ฐ๊ฐ ๋‚˜๋ˆ„๊ณ , ๊ฐ ์ด๋ฏธ์ง€๋ฅผ 100x100 ํฌ๊ธฐ์˜ 2์ฐจ์› ๋ฐฐ์—ด์—์„œ ๊ธธ์ด๊ฐ€ 10,000์ธ 1์ฐจ์› ๋ฐฐ์—ด๋กœ ํŽผ์ณ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋ฐฐ์—ด์„ ๊ณ„์‚ฐํ•  ๋•Œ ํŽธ๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

 

fruits ๋ฐฐ์—ด์—์„œ ์ˆœ์„œ๋Œ€๋กœ 100๊ฐœ์”ฉ ์„ ํƒํ•˜๊ธฐ ์œ„ํ•ด ์Šฌ๋ผ์ด์‹ฑ ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋‹ค์Œ reshape() ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•ด ๋‘ ๋ฒˆ์งธ ์ฐจ์›(100)๊ณผ ์„ธ ๋ฒˆ์งธ ์ฐจ์›(100)์„ 10,000์œผ๋กœ ํ•ฉ์นฉ๋‹ˆ๋‹ค. ์ฒซ ๋ฒˆ์งธ ์ฐจ์›์„ -1๋กœ ์ง€์ •ํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋‚จ์€ ์ฐจ์›์„ ํ• ๋‹นํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์—์„œ๋Š” ์ฒซ ๋ฒˆ์งธ ์ฐจ์›์ด ์ƒ˜ํ”Œ ๊ฐœ์ˆ˜์ž…๋‹ˆ๋‹ค.

apple = fruits[0:100].reshape(-1, 100*100)
pineapple = fruits[100:200].reshape(-1, 100*100)
banana = fruits[200:300].reshape(-1, 100*100)

print(apple.shape)
# (100, 10000)

 

ํ™•์ธํ•ด๋ณด๋‹ˆ๊นŒ apple, pineapple, banana ๋ฐฐ์—ด์˜ ํฌ๊ธฐ๋Š” (100, 10000)์ž…๋‹ˆ๋‹ค. ๋‚˜๋จธ์ง€๋„ ๋‹ค ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

์ด์ œ apple, pineapple, banana ๋ฐฐ์—ด์— ๋“ค์–ด์žˆ๋Š” ์ƒ˜ํ”Œ์˜ ํ”ฝ์…€ ํ‰๊ท ๊ฐ’์„ ๊ณ„์‚ฐํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด ๋„˜ํŒŒ์ด mean() ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•  ๊ฒ๋‹ˆ๋‹ค. ์ƒ˜ํ”Œ๋งˆ๋‹ค ํ”ฝ์…€์˜ ํ‰๊ท ๊ฐ’์„ ๊ณ„์‚ฐํ•ด์•ผ ํ•˜๋ฏ€๋กœ mean() ๋ฉ”์„œ๋“œ๊ฐ€ ํ‰๊ท ์„ ๊ณ„์‚ฐํ•  ์ถ•์„ ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

axis=1๋กœ ์ง€์ •ํ•˜๋ฉด ๋‘ ๋ฒˆ์งธ ์ถ•์ธ ์—ด์„ ๋”ฐ๋ผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.

axis๋Š” Array(๋ฐฐ์—ด)์˜ ์ถ•์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. axis=0 ์ด๋ฉด ํ–‰ ๋ฐฉํ–ฅ, axis=1 ์ด๋ฉด ์—ด ๋ฐฉํ–ฅ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

 

์šฐ๋ฆฌ๊ฐ€ ํ•„์š”ํ•œ๊ฒƒ์€ ์ƒ˜ํ”Œ์˜ ํ‰๊ท ๊ฐ’ ์ž…๋‹ˆ๋‹ค. ์ƒ˜ํ”Œ์€ ๋ชจ๋‘ ๊ฐ€๋กœ๋กœ ๊ฐ’์„ ๋‚˜์—ดํ–ˆ์œผ๋‹ˆ axis=1๋กœ ์ง€์ •ํ•˜์—ฌ ํ‰๊ท ์„ ๊ณ„์‚ฐํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

(์•ž์— 2์ฐจ์› ๋ฐฐ์—ด์„ 1์ฐจ์› ๋ฐฐ์—ด๋กœ ์น˜ํ™˜ํ–ˆ๊ธฐ์— ๊ฐ€๋Šฅํ•œ ๊ณ„์‚ฐ ์ž…๋‹ˆ๋‹ค). ํ‰๊ท ์„ ๊ณ„์‚ฐํ•˜๋Š” Numpy np.mean() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด๋„ ๋˜์ง€๋งŒ Numpy ๋ฐฐ์—ด์€ ์ด๋Ÿฐ ํ•จ์ˆ˜๋“ค์„ ๋ฉ”์„œ๋“œ๋กœ๋„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. apple ๋ฐฐ์—ด์˜ mean() ๋ฉ”์„œ๋“œ๋กœ ๊ฐ ์ƒ˜ํ”Œ์˜ ํ”ฝ์…€ ํ‰๊ท  ๊ฐ’์„ ๊ณ„์‚ฐํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

print(apple.mean(axis=1))
[ 88.3346  97.9249  87.3709  98.3703  92.8705  82.6439  94.4244  95.5999
  90.681   81.6226  87.0578  95.0745  93.8416  87.017   97.5078  87.2019
  88.9827 100.9158  92.7823 100.9184 104.9854  88.674   99.5643  97.2495
  94.1179  92.1935  95.1671  93.3322 102.8967  94.6695  90.5285  89.0744
  97.7641  97.2938 100.7564  90.5236 100.2542  85.8452  96.4615  97.1492
  90.711  102.3193  87.1629  89.8751  86.7327  86.3991  95.2865  89.1709
  96.8163  91.6604  96.1065  99.6829  94.9718  87.4812  89.2596  89.5268
  93.799   97.3983  87.151   97.825  103.22    94.4239  83.6657  83.5159
 102.8453  87.0379  91.2742 100.4848  93.8388  90.8568  97.4616  97.5022
  82.446   87.1789  96.9206  90.3135  90.565   97.6538  98.0919  93.6252
  87.3867  84.7073  89.1135  86.7646  88.7301  86.643   96.7323  97.2604
  81.9424  87.1687  97.2066  83.4712  95.9781  91.8096  98.4086 100.7823
 101.556  100.7027  91.6098  88.8976]

 

Matplotlib์˜ hist() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด ํžˆ์Šคํ† ๊ทธ๋žจ์„ ๊ทธ๋ ค๋ณด์ฃ . ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜์— ๋Œ€ํ•œ ํžˆ์Šคํ† ๊ทธ๋žจ์„ ๋ชจ๋‘ ๊ฒน์ณ์„œ ๊ทธ๋ ค๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ•˜๋ ค๋ฉด ์กฐ๊ธˆ ํˆฌ๋ช…ํ•˜๊ฒŒ ํ•ด์•ผ ๊ฒน์นœ ๋ถ€๋ถ„์„ ์ž˜ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. alpha ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ 1๋ณด๋‹ค ์ž‘๊ฒŒ ํ•˜๋ฉด ํˆฌ๋ช…๋„๋ฅผ ์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋˜ํ•œ, Matplotlib์˜ legend() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด ์–ด๋–ค ๊ณผ์ผ์˜ ํžˆ์Šคํ† ๊ทธ๋žจ์ธ์ง€ ๋ฒ”๋ก€๋ฅผ ๋งŒ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

plt.hist(np.mean(apple, axis=1), alpha=0.8)
plt.hist(np.mean(pineapple, axis=1), alpha=0.8)
plt.hist(np.mean(banana, axis=1), alpha=0.8)
plt.legend(['apple', 'pineapple', 'banana'])
plt.show()

 

ํžˆ์Šคํ† ๊ทธ๋žจ์„ ๋ณด๋ฉด ๋ฐ”๋‚˜๋‚˜ ์‚ฌ์ง„์˜ ํ‰๊ท ๊ฐ’์€ 40 ์ดํ•˜์— ์ง‘์ค‘๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ๊ณผ์™€ ํŒŒ์ธ์• ํ”Œ์€ 90~100 ์‚ฌ์ด์— ๋งŽ์ด ๋ชจ์—ฌ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฆผ์„ ๋ณด๋ฉด ๋ฐ”๋‚˜๋‚˜๋Š” ํ”ฝ์…€ ํ‰๊ท ๊ฐ’๋งŒ์œผ๋กœ ์‚ฌ๊ณผ๋‚˜ ํŒŒ์ธ์• ํ”Œ๊ณผ ํ™•์‹คํžˆ ๊ตฌ๋ถ„๋ฉ๋‹ˆ๋‹ค. ๋ฐ”๋‚˜๋‚˜๋Š” ์‚ฌ์ง„์—์„œ ์ฐจ์ง€ํ•˜๋Š” ์˜์—ญ์ด ์ž‘๊ธฐ ๋•Œ๋ฌธ์— ํ‰๊ท ๊ฐ’์ด ์ž‘์Šต๋‹ˆ๋‹ค. ๋ฐ˜๋ฉด, ์‚ฌ๊ณผ์™€ ํŒŒ์ธ์• ํ”Œ์€ ๋งŽ์ด ๊ฒน์ณ ์žˆ์–ด์„œ ํ”ฝ์…€๊ฐ’๋งŒ์œผ๋กœ๋Š” ๊ตฌ๋ถ„ํ•˜๊ธฐ ์‰ฝ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‚ฌ๊ณผ์™€ ํŒŒ์ธ์• ํ”Œ์€ ๋Œ€์ฒด๋กœ ํ˜•ํƒœ๊ฐ€ ๋™๊ทธ๋ž—๊ณ  ์‚ฌ์ง„์—์„œ ์ฐจ์ง€ํ•˜๋Š” ํฌ๊ธฐ๋„ ๋น„์Šทํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

 

์ข€ ๋” ๋‚˜์€ ๋ฐฉ๋ฒ•์€ ํ”ฝ์…€๋ณ„ ํ‰๊ท ๊ฐ’์„ ๋น„๊ตํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ „์ฒด ์ƒ˜ํ”Œ์— ๋Œ€ํ•ด ๊ฐ ํ”ฝ์…€์˜ ํ‰๊ท ์„ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ์ด์ฃ . ์„ธ ๊ณผ์ผ์€ ๋ชจ์–‘์ด ๋‹ค๋ฅด๋ฏ€๋กœ ํ”ฝ์…€๊ฐ’์ด ๋†’์€ ์œ„์น˜๊ฐ€ ์กฐ๊ธˆ ๋‹ค๋ฅผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ํ”ฝ์…€์˜ ํ‰๊ท ์„ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ๋„ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. axis=0์œผ๋กœ ์ง€์ •ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์ด๋ฒˆ์—๋Š” Matplotlib์˜ bar() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด ํ”ฝ์…€ 10,000๊ฐœ์— ๋Œ€ํ•œ ํ‰๊ท ๊ฐ’์„ ๋ง‰๋Œ€๊ทธ๋ž˜ํ”„๋กœ ๊ทธ๋ ค๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

subplots() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด 3๊ฐœ์˜ ์„œ๋ธŒ๊ทธ๋ž˜ํ”„๋ฅผ ๋งŒ๋“ค์–ด ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜์— ๋Œ€ํ•œ ๋ง‰๋Œ€๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ ค๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

fig, axs = plt.subplots(1, 3, figsize=(20, 5))
axs[0].bar(range(10000), np.mean(apple, axis=0))
axs[1].bar(range(10000), np.mean(pineapple, axis=0))
axs[2].bar(range(10000), np.mean(banana, axis=0))
plt.show()

 

์ˆœ์„œ๋Œ€๋กœ ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜ ๊ทธ๋ž˜ํ”„์ž…๋‹ˆ๋‹ค. 3๊ฐœ์˜ ๊ทธ๋ž˜ํ”„๋ฅผ ๋ณด๋ฉด ๊ณผ์ผ๋งˆ๋‹ค ๊ฐ’์ด ๋†’์€ ๊ตฌ๊ฐ„์ด ๋‹ค๋ฆ…๋‹ˆ๋‹ค.

์‚ฌ๊ณผ๋Š” ์‚ฌ์ง„ ์•„๋ž˜์ชฝ์œผ๋กœ ๊ฐˆ์ˆ˜๋ก ๊ฐ’์ด ๋†’์•„์ง€๊ณ , ํŒŒ์ธ์• ํ”Œ ๊ทธ๋ž˜ํ”„๋Š” ๋น„๊ต์  ๊ณ ๋ฅด๋ฉด์„œ ๋†’์Šต๋‹ˆ๋‹ค. ๋ฐ”๋‚˜๋‚˜๋Š” ํ™•์‹คํžˆ ์ค‘์•™์˜ ํ”ฝ์…€๊ฐ’์ด ๋†’์Šต๋‹ˆ๋‹ค.

 

ํ”ฝ์…€ ํ‰๊ท ๊ฐ’์„ 100x100 ํฌ๊ธฐ๋กœ ๋ฐ”๊ฟ”์„œ ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ ์ถœ๋ ฅํ•˜์—ฌ ์œ„ ๊ทธ๋ž˜ํ”„์™€ ๋น„๊ตํ•˜๋ฉด ๋” ์ข‹์Šต๋‹ˆ๋‹ค.

ํ”ฝ์…€์„ ํ‰๊ท  ๋‚ธ ์ด๋ฏธ์ง€๋Š” ๋ชจ๋“  ์‚ฌ์ง„์„ ํ•ฉ์ณ ๋†“์€ ๋Œ€ํ‘œ ์ด๋ฏธ์ง€๋กœ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

apple_mean = np.mean(apple, axis=0).reshape(100, 100)
pineapple_mean = np.mean(pineapple, axis=0).reshape(100, 100)
banana_mean = np.mean(banana, axis=0).reshape(100, 100)

fig, axs = plt.subplots(1, 3, figsize=(20, 5))
axs[0].imshow(apple_mean, cmap='gray_r')
axs[1].imshow(pineapple_mean, cmap='gray_r')
axs[2].imshow(banana_mean, cmap='gray_r')
plt.show()


ํ‰๊ท ๊ฐ’๊ณผ ๊ฐ€๊นŒ์šด ์‚ฌ์ง„ ๊ณ ๋ฅด๊ธฐ

์‚ฌ๊ณผ ์‚ฌ์ง„์˜ ํ‰๊ท ๊ฐ’์ธ apple_mean๊ณผ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์‚ฌ์ง„์„ ์ฐพ๊ธฐ ์œ„ํ•ด ์ ˆ๋Œ“๊ฐ’์„ ๊ณ„์‚ฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 

NumPy์˜ abs() ํ•จ์ˆ˜๋Š” ์ ˆ๋Œ“๊ฐ’์„ ๊ณ„์‚ฐํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, np.abs(-1)์€ 1์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

๋ฐฐ์—ด์„ ์ž…๋ ฅํ•˜๋ฉด ๋ชจ๋“  ์›์†Œ์˜ ์ ˆ๋Œ“๊ฐ’์„ ๊ณ„์‚ฐํ•˜์—ฌ ์ž…๋ ฅ๊ณผ ๋™์ผํ•œ ํฌ๊ธฐ์˜ ๋ฐฐ์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ํ•จ์ˆ˜๋Š” np.absolute() ํ•จ์ˆ˜์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

 

๋‹ค์Œ ์ฝ”๋“œ์—์„œ๋Š” abs_diff๊ฐ€ (300, 100, 100) ํฌ๊ธฐ์˜ ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๊ฐ ์ƒ˜ํ”Œ์— ๋Œ€ํ•œ ํ‰๊ท ์„ ๊ตฌํ•˜๊ธฐ ์œ„ํ•ด axis์— ๋‘ ๋ฒˆ์งธ์™€ ์„ธ ๋ฒˆ์งธ ์ฐจ์›์„ ๋ชจ๋‘ ์ง€์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๊ณ„์‚ฐํ•œ abs_mean์€ ๊ฐ ์ƒ˜ํ”Œ์˜ ์˜ค์ฐจ ํ‰๊ท ์ด๋ฏ€๋กœ ํฌ๊ธฐ๊ฐ€ (300,)์ธ 1์ฐจ์› ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค.

 

abs_diff = np.abs(fruits - apple_mean)
abs_mean = np.mean(abs_diff, axis=(1,2))
print(abs_mean.shape)

 

๊ทธ๋‹ค์Œ, ์ด ๊ฐ’์ด ๊ฐ€์žฅ ์ž‘์€ ์ˆœ์„œ๋Œ€๋กœ 10๊ฐœ๋ฅผ ๊ณจ๋ผ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ฆ‰, apple_mean๊ณผ ์˜ค์ฐจ๊ฐ€ ๊ฐ€์žฅ ์ž‘์€ ์ƒ˜ํ”Œ 100๊ฐœ๋ฅผ ๊ณ ๋ฅด๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. np.argsort() ํ•จ์ˆ˜๋Š” ์ž‘์€ ๊ฒƒ์—์„œ ํฐ ์ˆœ์„œ๋Œ€๋กœ ๋‚˜์—ดํ•œ abs_mean ๋ฐฐ์—ด์˜ ์ธ๋ฑ์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

์ด ์ธ๋ฑ์Šค ์ค‘์—์„œ ์ฒ˜์Œ 100๊ฐœ๋ฅผ ์„ ํƒํ•ด 10x10 ๊ฒฉ์ž๋กœ ์ด๋ฃจ์–ด์ง„ ๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ ค๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

apple_index = np.argsort(abs_mean)[:100]
fig, axs = plt.subplots(10, 10, figsize=(10,10))
for i in range(10):
    for j in range(10):
        axs[i, j].imshow(fruits[apple_index[i*10 + j]], cmap='gray_r')
        axs[i, j].axis('off')
plt.show()

 

ํ‘๋ฐฑ ์‚ฌ์ง„์— ์žˆ๋Š” ํ”ฝ์…€ ๊ฐ’์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ณผ์ผ ์‚ฌ์ง„์„ ๋ชจ์œผ๋Š” ์ž‘์—…์„ ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋น„์Šทํ•œ ์ƒ˜ํ”Œ๋ผ๋ฆฌ ๊ทธ๋ฃน์œผ๋กœ ๋ชจ์œผ๋Š” ์ž‘์—…์„ ๊ตฐ์ง‘ํ™”(clustering)์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๊ตฐ์ง‘ํ™”๋Š” ๋Œ€ํ‘œ์ ์ธ ๋น„์ง€๋„ ํ•™์Šต ์ž‘์—… ์ค‘ ํ•˜๋‚˜์ž…๋‹ˆ๋‹ค. ๊ตฐ์ง‘ํ™” ์•Œ๊ณ ๋ฆฌ์ฆ˜์—์„œ๋Š” ๊ทธ๋ฃน์„ ํด๋Ÿฌ์Šคํ„ฐ(cluster)๋ผ๊ณ  ๋ถ€๋ฆ…๋‹ˆ๋‹ค.

 

ํ•˜์ง€๋งŒ ์šฐ๋ฆฌ๋Š” ์ด๋ฏธ ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜๊ฐ€ ๋ฌด์—‡์ธ์ง€ ์•Œ๊ณ  ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์—, ๊ฐ ๊ณผ์ผ์˜ ํ‰๊ท  ํ”ฝ์…€ ๊ฐ’์„ ๊ณ„์‚ฐํ•˜๊ณ  ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ๊ณผ์ผ์„ ์ฐพ์„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ฆ‰, ํƒ€๊นƒ๊ฐ’์ด ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ๊ณผ, ํŒŒ์ธ์• ํ”Œ, ๋ฐ”๋‚˜๋‚˜์˜ ์‚ฌ์ง„ ํ‰๊ท ๊ฐ’์„ ๋ฏธ๋ฆฌ ๊ตฌํ•  ์ˆ˜ ์žˆ์—ˆ๋˜ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

์‹ค์ œ ๋น„์ง€๋„ ํ•™์Šต์—์„œ๋Š” ํƒ€๊นƒ๊ฐ’์„ ๋ชจ๋ฅด๊ธฐ ๋•Œ๋ฌธ์— ์ด์ฒ˜๋Ÿผ ์ƒ˜ํ”Œ์˜ ํ‰๊ท ๊ฐ’์„ ๋ฏธ๋ฆฌ ๊ตฌํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๋น„์ง€๋„ ํ•™์Šต์—์„œ๋Š” ๋ฐ์ดํ„ฐ์˜ ๊ตฌ์กฐ๋ฅผ ํŒŒ์•…ํ•˜๊ณ  ๋น„์Šทํ•œ ์ƒ˜ํ”Œ๋“ค์„ ์ž๋™์œผ๋กœ ๊ทธ๋ฃนํ™”ํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„์„ํ•ฉ๋‹ˆ๋‹ค. ํƒ€๊นƒ๊ฐ’์„ ๋ชจ๋ฅด๋ฉด์„œ ์„ธ ๊ณผ์ผ์˜ ํ‰๊ท ๊ฐ’์„ ์ฐพ์„์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์€, K-Mean ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ด์šฉํ•˜์—ฌ ์„ค๋ช…ํ•ด๋ณผ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ธ€์—์„œ ์„ค๋ช…ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 


Summary

 

  • ๋น„์ง€๋„ ํ•™์Šต: ๋จธ์‹ ๋Ÿฌ๋‹์˜ ํ•œ ์ข…๋ฅ˜๋กœ, ํ›ˆ๋ จ ๋ฐ์ดํ„ฐ์— ํƒ€๊นƒ์ด ์—†์Šต๋‹ˆ๋‹ค. ํƒ€๊นƒ์ด ์—†๊ธฐ ๋•Œ๋ฌธ์— ์™ธ๋ถ€์˜ ๋„์›€ ์—†์ด ์Šค์Šค๋กœ ์œ ์šฉํ•œ ๋ฌด์–ธ๊ฐ€๋ฅผ ํ•™์Šตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋Œ€ํ‘œ์ ์ธ ๋น„์ง€๋„ ํ•™์Šต ์ž‘์—…์—๋Š” ๊ตฐ์ง‘ํ™”์™€ ์ฐจ์› ์ถ•์†Œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํžˆ์Šคํ† ๊ทธ๋žจ: ๊ตฌ๊ฐ„๋ณ„๋กœ ๊ฐ’์ด ๋ฐœ์ƒํ•œ ๋นˆ๋„๋ฅผ ๊ทธ๋ž˜ํ”„๋กœ ํ‘œ์‹œํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋ณดํ†ต x์ถ•์€ ๊ฐ’์˜ ๊ตฌ๊ฐ„(๊ณ„๊ธ‰), y์ถ•์€ ๋ฐœ์ƒ ๋นˆ๋„(๋„์ˆ˜)๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
  • ๊ตฐ์ง‘ํ™”: ๋น„์Šทํ•œ ์ƒ˜ํ”Œ๋ผ๋ฆฌ ํ•˜๋‚˜์˜ ๊ทธ๋ฃน์œผ๋กœ ๋ชจ์œผ๋Š” ๋Œ€ํ‘œ์ ์ธ ๋น„์ง€๋„ ํ•™์Šต ์ž‘์—…์ž…๋‹ˆ๋‹ค. ๊ตฐ์ง‘ ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ๋ชจ์€ ์ƒ˜ํ”Œ ๊ทธ๋ฃน์„ ํด๋Ÿฌ์Šคํ„ฐ๋ผ๊ณ  ๋ถ€๋ฆ…๋‹ˆ๋‹ค.