scikit-learn.preprocessing 에서 KBinsDiscretizer 를 이용해서 Discretization 하기 continuous variable을 grouping 할 때 유용함 continuous 단일 column을 이용해서 grouping bins=2일때 세가지 방법 쉽게 이해하기 #1. strategy = 'uniform' #2. strategy = 'quantile' #3. strategy = 'kmeans' purpose : y_train_pd 라는 데이터프레임의 pred-true라는 column으로 grouping #0. data train_pt = pd.DataFrame(y_train_pd['pred-true']) #1. strategy = 'uniform' : mean 기..
imbalanced dataset을 이용해서 maching learning modeling을 할때 크게 두가지 방법이 있음 1. hyperparameter tuning 과정에서 scale weight 2. oversampling Oversampling 기법으로 SMOTE(synthetic minority oversampling technique)가 일반적으로 많이 쓰임 그 일환으로 ADASYN(Adaptive synthetic sampling approach for imbalanced learning)을 이용해서 oversampling 해보겠음. #1 데이터 준비 X_train_features_imputed.info() #2 ADASYN 이용 oversampling - hyper parameter에서 s..
Command Mode (press Esc to enable) Enter : enter edit mode Shift-Enter : run cell, select below Ctrl-Enter : run cell Alt-Enter : run cell, insert below Y : to code M : to markdown R : to raw 1 : to heading 1 2 : to heading 2 3 : to heading 3 4 : to heading 4 5 : to heading 5 6 : to heading 6 Up : select cell above K : select cell above Down : select cell below J : select cell below A : insert c..