yceffort

12 posts tagged with "machine-learning"

Tensorflow.js - 07. Build an image classifier

Posted on February, 2020

Transfer learning image classifier 1. Introduction ๋ฐฐ์šฐ๊ฒŒ ๋  ๊ฒƒ 2. ์š”๊ตฌ ์‚ฌํ•ญ 3. Tensorflow.js์™€ MobileNet ๋ถˆ๋Ÿฌ์˜ค๊ธฐ 4. ๋ธŒ๋ผ์šฐ์ €์—์„œ MobileNet์„ ๋กœ๋”ฉ 5. MobileNet์„ ํ…Œ์ŠคํŠธ ํ•˜๊ธฐ 6. ๋ธŒ๋ผ์šฐ์ €์—์„œ ์›น์บ ์„ ํ™œ์šฉํ•˜์—ฌ MobileNet ๋ชจ๋ธ์„ ์‹คํ–‰ํ•˜๊ธฐ 7. MobileNetโ€ฆ

Read full post

Tensorflow.js - 05. Training and Prediction in Node.js

Posted on January, 2020

Training and Prediction in Node.js 1. ์†Œ๊ฐœ 2. ์š”๊ตฌ ์‚ฌํ•ญ 3. Nodejs.app ์„ค์น˜ 4. ํ•™์Šต/ํ…Œ์ŠคํŠธ์šฉ ๋ฐ์ดํ„ฐ ์„ค์น˜ํ•˜๊ธฐ 5. ๊ตฌ์งˆ์„ ๊ตฌ๋ณ„ํ•˜๋Š” ๋ชจ๋ธ ๋งŒ๋“ค๊ธฐ 6. ๋ชจ๋ธ์„ ์„œ๋ฒ„์—์„œ ํ›ˆ๋ จ์‹œํ‚ค๊ธฐ 7. ํด๋ผ์ด์–ธํŠธ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค๊ณ  display ์šฉ ์ฝ”๋“œ ๋งŒ๋“ค๊ธฐ 8. ์•ฑ ์‹คํ–‰ํ•˜๊ธฐ 9. ๋ฐฐ์šด๊ฒƒ Training and Predictionโ€ฆ

Read full post

Tensorflow.js - 04. CNN

Posted on January, 2020

Handwritten digit recognition with CNNs 1. ๋“ค์–ด๊ฐ€๊ธฐ์ „์— ๋งŒ๋“ค์–ด ๋ณผ ๊ฒƒ ์šฐ๋ฆฌ๊ฐ€ ๋ฐฐ์šธ ๊ฒƒ ํ•™์Šต ์ „์— ์ค€๋น„ํ•ด์•ผ ํ•  ๊ฒƒ 2. Set up HTML, Javascript ์ƒ์„ฑ ๋ฐ์ดํ„ฐ์™€ ์ฝ”๋“œ๋ฅผ ์œ„ํ•œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ ์ƒ์„ฑ ํ…Œ์ŠคํŠธ ํ•ด๋ณด๊ธฐ 3. Load the Data 4. ์ž‘์—…์˜ ๊ฐœ๋…ํ™”โ€ฆ

Read full post

Tensorflow.js - 03. Linear Regression

Posted on December, 2019

Linear Regression ๋ช‡ ๋ฒˆ์งธ ์„ ํ˜• ํšŒ๊ท€์ธ์ง€ ์•Œ ์ˆ˜ ์—†๋‹ค. 01. 2d data๋กœ ์˜ˆ์ธกํ•ด๋ณด๊ธฐ ์ด๋ฒˆ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์ž๋™์ฐจ ์„ธํŠธ๋ฅผ ํ‘œํ˜„ํ•œ ์ˆซ์ž ๋ฐ์ดํ„ฐ๋กœ ์˜ˆ์ธกํ•˜๋Š” ๋ชจ๋ธ์„ ํ›ˆ๋ จ์‹œ์ผœ ๋ด…๋‹ˆ๋‹ค. ์ด ์—ฐ์Šต์—์„œ๋Š” ๋‹ค์–‘ํ•œ ์ข…๋ฅ˜์˜ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋Š” ๊ณตํ†ต์ ์ธ ๋‹จ๊ณ„๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ , ์ด์— ๋”ฐ๋ผ ์ž‘์€ ๋ฐ์ดํ„ฐ ์„ธํŠธ์™€ ๊ฐ„๋‹จํ•œ ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. 1์ฐจ์ ์ธ ๋ชฉํ‘œ๋Š” Tensorflowโ€ฆ

Read full post

Tensorflow.js - 01. ์‹œ์ž‘ํ•˜๊ธฐ

Posted on December, 2019

https://www.tensorflow.org/js/tutorials์„ ๊ฐœ์ธ์ ์ธ ํ•™์Šต์„ ์œ„ํ•ด ๋ฒˆ์—ญํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์ •ํ™•ํ•œ ๋ฒˆ์—ญ์„ ์œ„ํ•ด์„œ๊ฐ€ ์•„๋‹ˆ๋ผ, ๊ฐœ์ธ์ ์ธ ๊ณต๋ถ€๋ฅผ ์œ„ํ•ด์„œ ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์˜คํ•ด ใ„ดใ„ด ์‹œ์ž‘ํ•˜๊ธฐ Tensorflow.js๋Š” ๋ธŒ๋ผ์šฐ์ €์™€ Node.jsโ€ฆ

Read full post

Tensorflow.js - 02. ์„ค์น˜ํ•˜๊ธฐ

Posted on December, 2019

์ด์ „๊ธ€ ๋ณด๊ธฐ ์„ค์น˜ ๋ธŒ๋ผ์šฐ์ € ์„ค์น˜ Tensorflow.js๋ฅผ ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋‘ ๊ฐ€์ง€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. Script tag๋ฅผ ์ด์šฉํ•˜๋Š”๋ฒ• npm์„ ์ด์šฉํ•ด์„œ ์„ค์น˜ํ•˜๊ณ , Parcel, Webpack, Rollupโ€ฆ

Read full post

Step by Step machine laerning - 05

Posted on December, 2018

Training Models ์ •๊ทœ ๋ฐฉ์ •์‹์„ ํ™œ์šฉํ•œ ์„ ํ˜• ํšŒ๊ท€ ํ…Œ์ŠคํŠธ ์šฉ์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. training-models-1 ์œ„์—์„œ $$y = 4+ 3x1 + Gaussian Noise$$ ๋กœ ์ƒ์„ฑํ•ด์„œ $$\theta0=4$$ ์™€ $$\theta1=3$$๋ฅผ ๊ธฐ๋Œ€ํ–ˆ์ง€๋งŒ, ์‹ค์ œ๋กœ๋Š” $$\theta0=4.325$$ ์™€ $$\theta_1=2.77โ€ฆ

Read full post

Step by Step machine laerning - 03

Posted on November, 2018

Classification 2 ROC ์ปค๋ธŒ ROC ์ปค๋ธŒ๋Š” Binary Classification์—์„œ ๊ฐ€์žฅ ์ž˜ ์‚ฌ์šฉํ•˜๋Š” ๊ฒ€์ฆ๊ธฐ๋‹ค. ์™ผ์ชฝ ์œ„๋กœ ๊ทธ๋ž˜ํ”„๊ฐ€ ์ƒ์Šนํ•ด ์žˆ์„ ์ˆ˜๋ก (์šฐํ•˜๋‹จ ๋ฉด์ ์ด ๋„“์„ ์ˆ˜๋ก) ์ข‹์€ ๋ถ„๋ฅ˜๊ธฐ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค. ml-2-3.png ์ด๋Ÿฐ ๊ทธ๋ž˜ํ”„๊ฐ€ ์•„๋‹ˆ๊ณ , ์ ์ˆ˜๋ฅผ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด ์ด ROC ์ปค๋ธŒ๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์™€ ๋น„๊ตํ•ด๋ณด์ž. ml-2-4.pngโ€ฆ

Read full post

Step by Step machine laerning - 02

Posted on November, 2018

Classification MNIST๋Š” ๊ฐ ์ˆซ์ž๋ฅผ ์†์œผ๋กœ ์“ด ์ด๋ฏธ์ง€๋ฅผ ๋ชจ์•„๋†“์€ ๋ฐ์ดํ„ฐ ์…‹์ž…๋‹ˆ๋‹ค. ์ด ๋ฐ์ดํ„ฐ ์…‹์„ ํ•™์Šต์‹œ์ผœ์„œ, ์ด ์†๊ธ€์”จ๊ฐ€ ๊ณผ์—ฐ ์ˆซ์ž ๋ช‡์„ ์˜๋ฏธํ•˜๋Š”์ง€ ํŒ๋ณ„ ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•™์Šต์‹œ์ผœ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 1. ๋ฐ์ดํ„ฐ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ์›๋ž˜๋Œ€๋กœ ๋ผ๋ฉด, sklearnโ€ฆ

Read full post

Step by Step machine laerning - 01

Posted on November, 2018

California Housing ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ scikt-learn์„ ํ™œ์šฉํ•œ ๋จธ์‹ ๋Ÿฌ๋‹ ์˜ˆ์ œ. 1. ๊ธฐ๋ณธ์ ์ธ ๋ฐ์ดํ„ฐ ๋กœ๋”ฉ ํ”„๋ก์‹œ ํ™˜๊ฒฝ์ด๋ผ, ํ”„๋ก์‹œ๋ฅผ ํ•ธ๋“ค๋Ÿฌ์— ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋Š” ํ…์ŠคํŠธ๋กœ ์ •๋ณด๊ฐ€ ๋“ค์–ด๊ฐ€ ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ๊ทธ๋ž˜ํ”„๋กœ ๋ณด์ž ml-1-1.png 2. ๋ฐ์ดํ„ฐ ๋ถ„์„ ์ด์ œ ๋ฐ์ดํ„ฐ๋ฅผ test set๊ณผ train set์œผ๋กœ ๋‚˜๋ˆ  ๋ณด์ž. testsizeโ€ฆ

Read full post