더미 코딩

insurance = read.csv('mlwr/insurance.csv') # 데이터 확인str(insurance)'data.frame': 1338 obs. of 7 variables:age:int19182833323146373760... sex : Factor w/ 2 levels "female","male": 1 2 2 2 2 1 1 1 2 1 ...bmi:num27.933.83322.728.925.733.427.729.825.8... children: int 0 1 3 0 0 0 1 3 2 0 ...smoker:Factorw/2levels"no","yes":2111111111... region : Fact..