본문 바로가기

판다스4

09. 랜덤 포레스트 (Random Forest) | Hotel 1. Hotel 데이터셋   파일 가져오기         hotel_df = pd.read_csv('/content/drive/MyDrive/1. KDT/6. 머신러닝 딥러닝/데이터/hotel.csv')      hotel_df     정보보기          hotel_df.info()   * hotel: 호텔 종류* is_canceled: 취소 여부* lead_time: 예약 시점으로부터 체크인 될 때까지의 기간(얼마나 미리 예약했는지)* arrival_date_year: 예약 연도* arrival_date_month: 예약 월* arrival_date_week_number: 예약 주* arrival_date_day_of_month: 예약 일* stays_in_weekend_.. 2024. 6. 12.
07. 로지스틱 회귀(Logistic Regression) | 인사자료 1. 인사자료 데이터셋   작업파일   import           import numpy as np        import pandas as pd        import seaborn as sns        import matplotlib.pyplot as plt    데이터 가져오기               hr_df=pd.read_csv('/content/drive/MyDrive/1. KDT/6. 머신러닝 딥러닝/데이터/hr.csv')          hr_df.head()    정보보기                hr_df.info()     통계치보기          hr_df.describe()    고과점수에 따른 승진여부 그래프로 보기           sn.. 2024. 6. 12.
05. 선형회귀(Linear Regression) | Rent 1. Rent 데이터셋 - 집월세 매물정보- 출처: 캐글 작업파일   import         import numpy as np        import pandas as pd        import seaborn as sns     파일 가져오기         rent_df = pd.read_csv('/content/drive/MyDrive/1. KDT/6. 머신러닝 딥러닝/데이터/rent.csv')        rent_df    정보보기           rent_df.info()     통계량, 평균치 보기          # describe() 함수는 수치 기준으로 나온 데이터들을 테이블로 변환        rent_df.describe()    소수점 둘째 자리까지.. 2024. 6. 11.
04. 데이터 전처리 | 타이타닉 1. 타이타닉 데이터   자료: https://bit.ly/fc-ml-titanic  import             import numpy as np          import pandas as pd    데이터 불러오기            # 데이터 불러오기          df = pd.read_csv('https://bit.ly/fc-ml-titanic')          df     데이터 전처리- 데이터 정제 작업을 뜻함 - 필요없는 데이터를 삭제하고, null이 있는 행을 처리하고, 정규화/표준화 등의 많은 작업들을 포함 - 머신러닝, 딥러닝 실무에서 전처리가 차지하는 중요도는 50% 이상을 차지한다.  @. 데이터전처리1. 종속변수와 독립변수 나누기 종속변수와 독립변수 나누기      .. 2024. 6. 10.
LIST