์ „์ฒด ๊ธ€

Python, C++, Data Science ๊ณต๋ถ€ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค.
ยทpython
ํŒŒ์ด์ฌ์œผ๋กœ ๊ธฐ์ดˆ์ ์ธ ํ”„๋กœ๊ทธ๋žจ์„ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํ•˜๋‹ค ๋ณด๋ฉด, ์˜ค๋ฅ˜๋ฅผ ํ•ธ๋“ค๋ง ํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค.  When user enters invalid input, it is common to abort the program. ๊ทธ๋ ‡๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š”, sys standard library module์— ์ •์˜๋œ exit ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. from sys import exitif not (userResponse == "n" or userResponse == "y"): exit("Error: you must enter either n or y.") exit(errorMessage) ํ˜•์‹์œผ๋กœ ํ”„๋กœ๊ทธ๋žจ terminate ์‹œ์— ์ถœ๋ ฅ๋  ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ์ธ์ž๋กœ ๋„ฃ์œผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
ยทpython
There are some ways in Python to analyze string.  substring in sReturns True if the string s contains substring and False otherwise.if "-" is not in name: ...s.count(substring)Returns the number of non-overlapping occurrences of substring in s.s.endswith(substring)Returns True if the string s ends with the substring and False otherwise.s.startswith(substring)Returns True if the string s starts w..
There are two types of predictions in data science. Regression์€ numerical data๋ฅผ ์˜ˆ์ธกํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•˜๊ณ , Classification ์€ cateogorical data๋ฅผ ์˜ˆ์ธกํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.  ์˜ˆ๋ฅผ ๋“ค์–ด, ์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ์ด๋ฉ”์ผ์˜ ์ŠคํŒธ ๋ฉ”์ผํ•จ์ด ์žˆ์Šต๋‹ˆ๋‹ค.๋ฉ”์ผ์˜ ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ŠคํŒธ์ธ์ง€ ์•„๋‹Œ์ง€, Yes or No ์— ํ•ด๋‹นํ•˜๋Š” Cateogorical variable์„ ์˜ˆ์ธกํ•ฉ๋‹ˆ๋‹ค. Input = Text / Output = Yes or No (Spam, Not Spam) Classification์— ๋Œ€ํ•ด์„œ ๋” ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ ์ด์ „, ๊ฐ„๋‹จํ•˜๊ฒŒ Machine Learning์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.  Machine Learning Algorit..
In a simple linear regression line (LMS), the regression line can be expressed as following equation:y = ax + bwherey = The variable that you want to predict (์˜ˆ์ธกํ•˜๊ณ  ์‹ถ์€ ๊ฐ’) | Dependent variable (์ข…์† ๋ณ€์ˆ˜)x = The variable that you are using to predict (์˜ˆ์ธก์— ์‚ฌ์šฉํ•˜๋Š” ๊ฐ’) | Independent variable (๋…๋ฆฝ ๋ณ€์ˆ˜)a = Slope (๊ธฐ์šธ๊ธฐ)b = y-intercept (y ์ ˆํŽธ) ๊ทธ๋ ‡๋‹ค๋ฉด, y = ax+b ์—์„œ slope(a)์™€ y-intercept(b)๋Š” ์–ด๋–ป๊ฒŒ ๊ตฌํ•˜๋Š”์ง€ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Recall, r ..
Chan Lee
Chan Code & DS ๐Ÿง‘‍๐Ÿ’ป๐Ÿ“Š