[GoogleML] Error Analysis & Mismatched Train and Test Set

2023. 9. 30. 19:45ใ†ArtificialIntelligence/2023GoogleMLBootcamp

 

 

 

Carrying Out Error Analysis

error ์ค‘ dog๊ฐ€ ์ฐจ์ง€ํ•˜๋Š” ๋น„์œจ์ด ํฌ์ง€ ์•Š์„ ๋•Œ

 

 

 

๊ฐ•์•„์ง€๊ฐ€ ์ฐพ์ดํ•˜๋Š” ๋น„์œจ์ด 50%์˜€๋‹ค๋ฉด,

dog์— focus๋ฅผ ๋งž์ถ”์–ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๊ฒƒ์ด ํšจ๊ณผ์ ์ผ ์ˆ˜ ์žˆ๋‹ค

 

 

 

๋‹ค์–‘ํ•œ ์นดํ…Œ๊ณ ๋ฆฌ์˜ ์—๋Ÿฌ ์›์ธ์ด ์žˆ๋‹ค

๋†’์€ ๋น„์œจ์˜ ์›์ธ (great cats์™€ blurry์— focusํ•˜์—ฌ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.)

-> error์˜ ์ฃผ ์›์ธ์„ ๋ถ„์„ํ•  ์ˆ˜ ์žˆ๋‹ค. 

 

 

 

Cleaning Up Incorrectly Labeled Data

๋”ฅ๋Ÿฌ๋‹ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ 

1) random error์—๋Š” ๊ฐ•์ธํ•˜์ง€๋งŒ

2) system error์—๋Š” ์ทจ์•ฝํ•˜๋‹ค

 

 

 

๋งŒ์•ฝ incorrectly labeled error๊ฐ€ ํฐ ์˜ํ–ฅ๋ ฅ์„ ์ค€๋‹ค๋ฉด -> ๊ณ ์ณ๋ผ

์•„๋‹ˆ๋ผ๋ฉด? (์ ์€ ๋น„์œจ์ด๋ผ๋ฉด) ์ถ”์ฒœํ•˜์ง€ ์•Š์Œ

 

 

 

์ด๋Ÿฐ ์ƒํ™ฉ์—์„œ๋Š”?

์ž˜๋ชป ๋ ˆ์ด๋ธ” ๋œ ์—๋Ÿฌ๋Š” ๋ฌด์‹œํ•˜๊ณ  

๋‹ค๋ฅธ ์˜ค๋ฅ˜ ์›์ธ๋“ค์— ์ง‘์ค‘

 

 

 

dev set์˜ ๋ชฉ์ ์€ ์—ฌ๋Ÿฌ ๋ถ„๋ฅ˜๊ธฐ(๋ชจ๋ธ) ์ค‘ ๋” ๋‚˜์€ ๊ฒƒ์„ ์ฐพ๋Š” ๊ฒƒ 

๋‘๋ฒˆ์งธ ์‚ฌ๋ก€์™€ ๊ฐ™์ด incorrect labels๋กœ ์ธํ•œ ๋น„์œจ์ด ๋†’๋‹ค๋ฉด, ์ด์— focus

 

 

 

train์ด dev/test์™€ ์•ฝ๊ฐ„ ๋‹ค๋ฅธ ๋ถ„ํฌ๋ฅผ ๊ฐ€์ ธ๋„ ๊ดœ์ฐฎ๋‹ค (๋‹ค์Œ week์— ์ด์–ด์„œ ์†Œ๊ฐœ๋  ๋‚ด์šฉ)

 

 

 

Build your First System Quickly, then Iterate

์–ด๋–ค ๋ฌธ์ œ์— focus๋ฅผ ๋งž์ถœ ๊ฒƒ์ธ์ง€ ์ •ํ•˜๋Š” ๊ฒƒ์€ ์–ด๋ ต๋‹ค

-> ๋น ๋ฅด๊ฒŒ ํƒ€๊ฒŸ์„ ์„ค์ •ํ•˜๊ณ , ML system์„ ๊ตฌ์ถ•ํ•˜๊ณ  (๋น ๋ฅด๊ฒŒ) -> ๋ฐ˜๋ณตํ•˜๋ผ

 

 

 

Don't over-thinking

 

 

 

์กฐ์–ธ !

 

 

 

Training and Testing on Different Distributions

๊ฐ€์ง„ ์ด๋ฏธ์ง€์˜ ๋Œ€๋ถ€๋ถ„์ด ๊ณ ํ™”์งˆ์˜ ์›น ์‚ฌ์ง„ 

ํ•˜์ง€๋งŒ ์šฐ๋ฆฌ๊ฐ€ ๋งž์ถ”์–ด์•ผ ํ•  ๋Œ€์ƒ์€ ํ๋ฆฐ ๋ชจ๋ฐ”์ผ ์‚ฌ์ง„ (๋ช‡ ์žฅ ์—†๋‹ค)

์ด๋Ÿฌํ•œ ๊ฒฝ์šฐ ์ฒซ๋ฒˆ์งธ ์˜ต์…˜์œผ๋กœ ๋‘˜์„ ํ•ฉ์นœ๋‹ค์Œ์— ๋‚˜๋‰œ๋‹ค

๋‹จ์ : ๋Œ€๋ถ€๋ถ„์˜ ๋น„์œจ์ด Web์— ๋งž์ถ”์–ด ์ตœ์ ํ™” -> ์šฐ๋ฆฌ๊ฐ€ ์ •์ž‘ ์ง‘์ค‘ํ•ด์•ผํ•  ๋Œ€์ƒ์ธ ๋ชจ๋ฐ”์ผ์€, ์ ์€ ๋น„์œจ๋กœ dev set์— ๋‚˜๋‰˜๊ฒŒ ๋จ

-> ๋”ฐ๋ผ์„œ ์ถ”์ฒœํ•˜๋Š” ๋ฐฉ๋ฒ• X

 

 

 

๋‘๋ฒˆ์งธ ์˜ต์…˜ 

web์€ train์—๋งŒ / ์šฐ๋ฆฌ์˜ ๋ชฉ์ ์€ dev, test, ์ผ๋ถ€ train -> mobile 

์šฐ๋ฆฌ๊ฐ€ ํ•ด๊ฒฐํ•ด์•ผํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ mobile์ธ ๊ฒƒ์€ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ,

์ด์ œ train๊ณผ dev/test์˜ distribution์ด ๋‹ฌ๋ผ์ ธ๋ฒ„๋ ธ๋‹ค!

 

 

 

dev / test๋ฅผ ๋‹ค๋ฅธ ๋ถ„ํฌ์—์„œ! 

 

 

 

Bias and Variance with Mismatched Data Distributions

dev - test๊ฐ€ ๋™์ผํ•œ ๋ถ„ํฌ๋ฅผ ๊ฐ™๋Š” ๊ฒƒ์ฒ˜๋Ÿผ,

train๊ณผ ๋™์ผํ•œ ๋ถ„ํฌ๋ฅผ ๊ฐ–๋Š” train-dev set์„ ๋งŒ๋“ ๋‹ค

(ํ•˜์ง€๋งŒ ๋ชจ๋ธ ํ•™์Šต์—๋Š” ์‚ฌ์šฉ๋˜์ง€ X)

 

 

 

train-dev์™€ train์˜ ์ฐจ์ด๊ฐ€ ๋งŽ์ด ๋‚œ๋‹ค?

๋ชจ๋ธ์ด ์˜ค๋ฒ„ํ”ผํŒ… ๋œ ์ƒํƒœ 

train-dev์™€ test์˜ ์ฐจ์ด๊ฐ€ ๋งŽ์ด ๋‚œ๋‹ค?

๋ฐ์ดํ„ฐ ๋ถ„ํฌ์˜ mismatch์— ์˜ํ•œ ์˜ค๋ฅ˜ 

 

 

 

+ human error (bayes error)์™€ training error์˜ ์ฐจ์ด -> avoidable error (๋ชจ๋ธ์ด ๋œ ํ•™์Šต๋œ ์ƒํƒœ)

 

 

 

์˜ค , , , 

๋” hierarchicalํ•œ ๊ตฌ์กฐ๋กœ ์ •๋ฆฌ๋œ ๊ฒƒ ๊ฐ™๋‹ค! :)

 

 

 

 

 

 

 

 

 

์ด 4๊ฐœ ์‚ฌ์ด์˜ ๊ด€๊ณ„์„ฑ

data mismatch -> ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐ? 

๋‹ค์Œ ๋น„๋””์˜ค์—์„œ ๋ฐฐ์›Œ๋ณด์ž! :)

 

 

 

Addressing Data Mismatch

์ธ์œ„์ ์ธ ๋ฐ์ดํ„ฐ ํ•ฉ์„ฑ ๋ฐฉ์‹์„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค

artificial data systhesis

 

 

 

๋‹ค์–‘ํ•œ, ๋งŽ์€ ๋ฐ์ดํ„ฐ๋ฅผ ํ•ฉ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค

 

 

 

car noise ๋ฐ์ดํ„ฐ ์–‘์ด ํฌ๋ฐ•ํ•  ๊ฒฝ์šฐ, ์˜ค๋ฒ„ํ”ผํŒ… ๋ฐœ์ƒ ๊ฐ€๋Šฅ 

 

 

 

data augmentation