전체 글

Every Morning, Enjoy Coding!
insurance = read.csv('mlwr/insurance.csv') # 데이터 확인str(insurance)'data.frame': 1338 obs. of 7 variables:$ age : int 19 18 28 33 32 31 46 37 37 60 ...$ sex : Factor w/ 2 levels "female","male": 1 2 2 2 2 1 1 1 2 1 ...$ bmi : num 27.9 33.8 33 22.7 28.9 25.7 33.4 27.7 29.8 25.8 ...$ children: int 0 1 3 0 0 0 1 3 2 0 ...$ smoker : Factor w/ 2 levels "no","yes": 2 1 1 1 1 1 1 1 1 1 ...$ region : Fact..
# 챌린저호의 사고 조사 데이터!!launch a a(Intercept) 3.698413> b btemperature-0.04753968 abline(a= a, b= b, col= 'blue') # 다중선형 회귀(multiple linear regression# y ~ x1 + x2 + x3 + ...str(launch)lm_launch |t|) (Intercept) 3.527093 1.307024 2.699 0.0142 * # 유의수준 0.05temperature -0.051386 0.018341 -2.802 0.0114 * # 온도와의 절대값이 가장 큼 -> 상관관계가 가장 큼field_check_pressure 0.001757 0.003402 0.517 0.6115 # 유의수준 1flight_num..
# 선형 회귀(Linear Regression)# 종속 변수 하나와 독립(설명) 변수들 간의 관계를 수식으로 설명/예측하는 방법# y = a + bx(a, b는 상수)# x: 독립(설명) 변수, y: 종속 변수 # 데이터 준비heights lm_heights lm_heights Call:lm(formula = son ~ father, data = heights) Coefficients:(Intercept) father 86.1026 0.5139 y절편 기울기 > summary(lm_heights) Call:lm(formula = son ~ father, data = heights) Residuals: # 오차/잔차 Min 1Q Median 3Q Max-22.5957 -3.8614 0.0091 4.1230..
# 버섯 분류 - 나이브 베이즈 방법 # 1. 데이터 준비mushroom 버섯 분류할 때 사용되지 않는 변수 -> 데이터 프레임에서 제거mushroom$veil_type
Codezoy
모닝코딩