๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€114

Spring - view ํ™˜๊ฒฝ์„ค์ • ์Šคํ”„๋ง ๋ถ€ํŠธ๊ฐ€ ์ œ๊ณตํ•˜๋Š” Welcome Page ๊ธฐ๋Šฅ static/index.html ์„ ์˜ฌ๋ ค๋‘๋ฉด Welcome page ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•œ๋‹ค. https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-bootfeatures.html#boot-features-spring-mvc-welcome-page thymeleaf ํ…œํ”Œ๋ฆฟ ์—”์ง„ thymeleaf ๊ณต์‹ ์‚ฌ์ดํŠธ: https://www.thymeleaf.org/ ์Šคํ”„๋ง ๊ณต์‹ ํŠœํ† ๋ฆฌ์–ผ: https://spring.io/guides/gs/serving-web-content/ ์Šคํ”„๋ง๋ถ€ํŠธ ๋ฉ”๋‰ด์–ผ: https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/.. 2023. 7. 3.
Spring - ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ start springboot ๋ฅผ ์ด์šฉํ•˜์—ฌ ์ดˆ๊ธฐ ์Šคํ”„๋ง ํ”„๋กœ์ ํŠธ ์ƒ์„ฑํ•œ๋‹ค. https://start.spring.io/ ์ดˆ๊ธฐ build.gradle์˜ ์ƒํƒœ๋Š” ์ด๋Ÿฌํ•˜๋‹ค. plugins { id 'java' id 'war' id 'org.springframework.boot' version '3.0.5' id 'io.spring.dependency-management' version '1.1.0' } group = 'hello' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-star.. 2023. 7. 3.
๋จธ์‹ ๋Ÿฌ๋‹ - 1 ์‚ฌ์ดํ‚ท๋Ÿฐ ํŒจํ‚ค์ง€๋ฅผ ์ด์šฉํ•˜๋ ค๋ฉด ๊ฐ ํŠน์„ฑ์˜ ๋ฆฌ์ŠคํŠธ๋ฅผ ์„ธ๋กœ ๋ฐฉํ–ฅ์œผ๋กœ ๋Š˜์–ด๋œจ๋ฆฐ 2์ฐจ์› ๋ฆฌ์ŠคํŠธ๋ฅผ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค. ์‚ฌ์ดํ‚ท๋Ÿฐ์€ ์ž…๋ ฅ๋ฐ์ดํ„ฐ ๋ฐฐ์—ด์ด ํ–‰: ์ƒ˜ํ”Œ, ์—ด: ํŠน์„ฑ์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค. [[32, 34], [34, 33], ... [36, 44]] ์ด๋Š” reshape(-1, 1)๋กœ ๋ฆฌ์ŠคํŠธ๋ฅผ 2์ฐจ์› ๋ฐฐ์—ด๋กœ ๋ฐ”๊ฟ”์ค„ ์ˆ˜ ์žˆ๋‹ค. zip() ํ•จ์ˆ˜ : ๋‚˜์—ด๋œ ๋ฆฌ์ŠคํŠธ์—์„œ ์›์†Œ๋ฅผ ํ•˜๋‚˜์”ฉ ๊บผ๋‚ด์ฃผ๋Š” ํ•จ์ˆ˜ ๐Ÿ‘‡๐Ÿป 1์ฐจ์› ๋ฐฐ์—ด์„ 2์ฐจ์› ๋ฆฌ์ŠคํŠธ๋กœ ๋ฐ˜ํ™˜ํ•˜๊ธฐ ๐Ÿ‘‡๐Ÿป fish_data = [[ l,w ] for l,w in zip(length, weight)] → ์—ฌ๊ธฐ์„œ length์™€ weight๊ฐ€ 1์ฐจ์› ๋ฐฐ์—ด, fish_data๋Š” 2์ฐจ์› ๋ฐฐ์—ด → predict์— ๊ฐ’์„ ๋„ฃ์–ด์ค„๋•Œ๋„, kn.predict([[ 30, 600 ]]) ์ด๋Ÿฐ์‹์œผ๋กœ ๋ฆฌ์ŠคํŠธ์˜ .. 2023. 7. 3.
์˜ˆ์™ธ์ฒ˜๋ฆฌ 2023. 7. 3.