본문 바로가기
  • 데이터에 가치를 더하다, 서영석입니다.

전체 글165

[동계인턴십] 암 예측 2 features=['STOMA','COLON','LIVER','LUNG','PROST','THROI','BREAC','RECTM'] y_df =df['LUNG'] X_df =df.drop(features, axis=1) from sklearn.model_selection import train_test_split X_train,X_test,y_train,y_test = train_test_split(X_df,y_df,test_size=0.2) from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegress.. 2022. 1. 11.
[2022 동계인턴십] 암 예측 import pandas as pd data=pd.read_csv('C:/Users/dudtj/OneDrive - 숭실대학교 - Soongsil University/Desktop/CL/python/동계인턴십_Data_1000/phenotype_1000.txt',engine="python",sep=" ") print(data.info()) 위 그림과 같이 null값이 데이터의 절반 이상을 차지하는 변수들이 있다. 데이터 보존을 위해 non-null값이 900 이상인 데이터들만 가져와 다시 df로 저장하였다. (1000개의 데이터이므로 90%만 뽑았다.) 이렇게 할 수 있는 이유는 drop시킨 변수들은 암 예측에 중요하지 않다고 판단한 변수들이었기 때문이다. data.columns df=data.loc[:,.. 2022. 1. 10.
Sleep AI Challenge 2021 ver.2 https://github.com/rootofdata/AILAB_Sleep-Scoring-Modeling.git GitHub - rootofdata/AILAB_Sleep-Scoring-Modeling Contribute to rootofdata/AILAB_Sleep-Scoring-Modeling development by creating an account on GitHub. github.com Sleep AI Challenge 2021 ver.2 -적외선 수면 동영상을 이용한 수면 단계 예측 적외선 수면 동영상을 이용하여 30초 간격으로 수면 단계(Wake, Light Sleep(N1, N2), Deep Sleep(N3, REM)) 예측 수면다원검사 중 같이 촬영되는 적외선 수면 동영상은 비접촉식으로 .. 2022. 1. 7.
[논문 1-2] 소비자 웨어러블 장치에서 파생된 원시 가속도 및 광혈류 측정기 심박수 데이터를 사용한 수면 단계 예측 https://github.com/rootofdata/AILAB_Sleep-Scoring-Modeling.git GitHub - rootofdata/AILAB_Sleep-Scoring-Modeling Contribute to rootofdata/AILAB_Sleep-Scoring-Modeling development by creating an account on GitHub. github.com 결과 인구 통계 및 요약 PSG 데이터 조사한 모든 알고리즘에서 동작,심박수 및 클럭 프록시와 같은 모든 기능이 분류기에 대한 입력으로 사용될 때 성능이 가장 좋았다. 조사된 모든 분류자에 대한 수면/각성 분류에 대한 성능 메트릭은 표 2–5에 요약되어 있다. 정확한 수면 시간의 비율(수면이 긍정적인 클래스로 취.. 2022. 1. 6.
[논문 1-1] 소비자 웨어러블 장치에서 파생된 원시 가속도 및 광혈류 측정기 심박수 데이터를 사용한 수면 단계 예측 https://github.com/rootofdata/AILAB_Sleep-Scoring-Modeling.git GitHub - rootofdata/AILAB_Sleep-Scoring-Modeling Contribute to rootofdata/AILAB_Sleep-Scoring-Modeling development by creating an account on GitHub. github.com Sleep stage prediction with raw acceleration and photoplethysmography heart rate data derived from a consumer wearable device Olivia Walch , Yitong Huang, Daniel Forger, Cathy.. 2022. 1. 6.
[2-4]타이타닉 생존자 예측 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline 타이타닉 데이터 : http:///www.kaggle.com/titanic/data titanic_df=pd.read_csv('C:/Users/dudtj/OneDrive - 숭실대학교 - Soongsil University/Desktop/CL/python/파이썬 머신러닝 완벽가이드/titanic_train.csv') titanic_df.head(3) print(titanic_df.info()) print(titanic_df.isnull().sum()) 이를 통해 Age,Cabin,Embarked에 Null값.. 2022. 1. 5.
[#3]데이터 전처리 데이터 인코딩 from sklearn.preprocessing import LabelEncoder items=['TV','냉장고','전자레인지','컴퓨터','선풍기','선풍기','믹서','믹서'] #LabelEncoder를 객체로 생성한 후, fit()과 transform()으로 레이블 인코딩 수행 encoder=LabelEncoder() encoder.fit(items) labels=encoder.transform(items) print('인코딩 변환값:',labels) print('인코딩 클래스:',encoder.classes_) print('디코딩 원본값:',encoder.inverse_transform([4,5,2,0,1,1,3,3])) 원-핫 인코딩(One-Hot Encoding) 각 속성을 분.. 2022. 1. 1.
수면상태와 뇌파의 연관성 수면상태와 뇌파의 연관성 https://github.com/rootofdata/AILAB_Sleep-Scoring-Modeling.git GitHub - rootofdata/AILAB_Sleep-Scoring-Modeling Contribute to rootofdata/AILAB_Sleep-Scoring-Modeling development by creating an account on GitHub. github.com 수면이란 ‘피로가 누적된 뇌의 활동을 주기적으로 회복하는 생리적인 의식상실 상태’로 ‘비-REM수면(NREM)과 급속한 안구 운동을 동반하는 ‘REM(Rapid Eye Movement)수면’이 교대로 나타난다. 일반적으로 NREM수면 이후 REM수면이 진행되며, NREM수면은 4단계로 진.. 2021. 12. 30.
[2. (2) 교차 검증] 과적합(Overfitting)은 모델이 학습 데이터에만 과도하게 최적화되어, 실제 예측에서 성능이 과도하게 떨어지는 것이다. 교차 검증은 본시험에 앞서 모의 시험을 여러번 치루는 것과 같다. 데이터 편중을 막기 위해서 별도의 여러 세트로 구성된 학습 데이터 세트와 검증 데이터 세트에서 학습과 평가를 수행하는 것이다. K fold 교차 검증 K개의 데이터 폴드 세트를 만들어서 K번만큼 각 폴트 세트에 학습과 검증 평가를 반복적으로 수행하는 방법이다. 아래 그림은 K=5인 경우이다. from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import accuracy_score from sklearn.model_selection import .. 2021. 12. 30.