Data_Analysis (294) 썸네일형 리스트형 판다스 - 카테고리 자료형 : Categorical, cat 속성, categories, codes, categorical 메서드 Pandas에는 정수 기반의 범주형 데이터를 표현(인코딩)할 수 있는 Categorical형이라고 하는 특수한 데이터형이 존재한다. 데이터프레임 제작 fruit 컬럼을 카테고리형 시리즈로 제작 fruit 컬럼은 파이썬 문자열 객체의 배열로 쉽게 범주형으로 바꿀 수 있다. Categorical 인스턴스 Categorical 객체는 categories와 codes 속성을 가진다. 만약 apple, orange, banana였으면 codes는 2 값도 가졌을 것이다. 컬럼을 범주형으로 변경 변경 완료된 값을 대입해서 DataFrame의 컬럼을 범주형으로 변경할 수 있다. Categorical 메서드 범주형 데이터를 담고 있는 Series는 특화된 문자열 메서드인 Series.str과 유사한 특수 메서드인 ca.. Kaggle - Bike Sharing Demand : Fit, Predict (Random Forest) https://steadiness-193.tistory.com/229 Kaggle - Bike Sharing Demand : EDA & Feature Engineering (2) https://steadiness-193.tistory.com/228 Kaggle - Bike Sharing Demand : EDA & Feature Engineering 데이터 출처 https://www.kaggle.com/c/bike-sharing-demand/data 컬럼 설명 자료형 datetime 일시 연-월-일.. steadiness-193.tistory.com 위 포스팅에서 전처리 완료한 feature들과 https://steadiness-193.tistory.com/231 Kaggle - Bike Sharing D.. Kaggle - Bike Sharing Demand : Hyperparameter Tuning (하이퍼파라미터 튜닝) https://steadiness-193.tistory.com/230 Kaggle - Bike Sharing Demand : Evaluation (Random Forest, Cross-validation) https://steadiness-193.tistory.com/228 Kaggle - Bike Sharing Demand : EDA & Feature Engineering 데이터 출처 https://www.kaggle.com/c/bike-sharing-demand/data 컬럼 설명 자료형 datetime 일시 연-월-일.. steadiness-193.tistory.com 위 포스팅에서 만들어낸 내용을 토대로 랜덤포레스트의 옵션들인, 하이퍼파라미터의 적절한 값을 찾아보자. [Coarse Search] .. Kaggle - Bike Sharing Demand : Evaluation (Random Forest, Cross-validation) https://steadiness-193.tistory.com/228 Kaggle - Bike Sharing Demand : EDA & Feature Engineering 데이터 출처 https://www.kaggle.com/c/bike-sharing-demand/data 컬럼 설명 자료형 datetime 일시 연-월-일 시:분:초 object season 계절 1: 봄 / 2: 여름 / 3: 가을 / 4: 겨울 int64 holiday 휴일 1: 휴일 / 0:.. steadiness-193.tistory.com https://steadiness-193.tistory.com/229 Kaggle - Bike Sharing Demand : EDA & Feature Engineering (2) https://.. Kaggle - Bike Sharing Demand : EDA & Feature Engineering (2) https://steadiness-193.tistory.com/228 Kaggle - Bike Sharing Demand : EDA & Feature Engineering 데이터 출처 https://www.kaggle.com/c/bike-sharing-demand/data 컬럼 설명 자료형 datetime 일시 연-월-일 시:분:초 object season 계절 1: 봄 / 2: 여름 / 3: 가을 / 4: 겨울 int64 holiday 휴일 1: 휴일 / 0:.. steadiness-193.tistory.com 위 포스팅과 연결됩니다. 온도 및 체감온도 1. 온도와 체감온도는 비례하는 경향을 나타내고 있다. 2. size에 count를 넣어서 보니, 온도와 체감온도가 낮을 때보다 높을 때 자전거 대여량.. Kaggle - Bike Sharing Demand : EDA & Feature Engineering 데이터 출처 https://www.kaggle.com/c/bike-sharing-demand/data 컬럼 설명 자료형 datetime 일시 연-월-일 시:분:초 object season 계절 1: 봄 / 2: 여름 / 3: 가을 / 4: 겨울 int64 holiday 휴일 1: 휴일 / 0: 휴일 아님 int64 workingday 근무일 1: 근무일 / 0: 근무일 아님 int64 weather 날씨 1: 아주 깨끗한 날씨 ~ 4: 아주 많은 비 int64 temp 온도 섭씨로 표현됨 float64 atemp 체감온도 섭씨로 표현됨 float64 humidity 습도 float64 windspeed 풍속 int64 casual 비회원의 자전거 대여량 int64 registered 회원의 자전거 대여량.. 판다스 - datetime : dt 연산자 활용 데이터 불러오기 자료형이 datetime인 datetime 컬럼을 만들어 데이터프레임으로 만들어줬다. https://steadiness-193.tistory.com/171 판다스 - to_datetime : format, dt to_datetime 메서드를 사용하면 Date 형식의 자료형을 datetime 오브젝트로 변환할 수 있다. 데이터 만들기 date컬럼은 자료형이 object이다. 이 문자열 날짜를 datetime 자료형으로 변환하려면 pd.to_datetime을 steadiness-193.tistory.com 위 포스팅에서 설명한 dt 연산자에 대해 조금 더 다양한 예시를 살펴보자 연도 추출 dt.year 월 추출 dt.month 일 추출 dt.day 시간 추출 dt.hour 분 추출 dt.mi.. Numpy - random : rand, randn 0부터 1사이의 균일분포로 랜덤한 ndarray 생성 - rand np.random.rand(N) 0이상, 1미만 N : 크기, 튜플로 입력하면 차원을 높일 수 있다. np.random.rand N : tuple로 입력하면 2차원으로 생성 가능 3행 5열의 배열 생성 https://steadiness-193.tistory.com/225 Numpy - random : normal, uniform, randint, choice 정규분포로부터 무작위 표본 추출 - normal np.random.normal(평균, 표준편차, 크기) * 평균은 0, 표준편차는 1이 기본값 np.random.normal 난수 50개 생성 균등분포로부터 무작위 표본추출 - uniform np.random.. steadiness-19.. 이전 1 ··· 6 7 8 9 10 11 12 ··· 37 다음