반응형

나는야 데이터사이언티스트 87

[Python]데이터 시각화, 연관성 분석 heat map, pairplot 그리기

데이터는 Kaggle에 있는 bostan marathon 데이터를 참고했다. https://www.kaggle.com/rojour/boston-results Finishers Boston Marathon 2015, 2016 & 2017 This data has the names, times and general demographics of the finishers www.kaggle.com In [12]: #tistory 관련 코드(필요없음) from IPython.core.display import display, HTML display(HTML("")) heatmap¶correlation http://seaborn.pydata.org/generated/seaborn.heatmap.html In [1]..

[Python]데이터 시각화, matplotlib & seaborn - line Plot(선 그래프)

데이터는 Kaggle에 있는 bostan marathon 데이터를 참고했다. https://www.kaggle.com/rojour/boston-results Finishers Boston Marathon 2015, 2016 & 2017 This data has the names, times and general demographics of the finishers www.kaggle.com In [29]: import pandas as pd pd.set_option('display.max_columns',500) #생략없이 출력 가능 In [63]: #tistory 관련 코드(필요없음) from IPython.core.display import display, HTML display(HTM..

[Python]pandas.cut - 데이터 범주화하기 / if문 쓰지않고 데이터 나누기

In [1]: import pandas as pd In [2]: #Tistory 관련 모듈이라 상관 없음. from IPython.core.display import display, HTML display(HTML("")) In [16]: #데이터 가져오기 https://www.kaggle.com/rojour/boston-results marathon_2017 = pd.read_csv("C://Users//82106//Desktop//boston-results//marathon_results_2017.csv") In [5]: marathon_2017.head() Out[5]: Unnamed: 0 Bib Name Age M/F City State Country Citizen Unnamed: 9 ... 25..

[Python]데이터 시각화, matplotlib & seaborn - Bar Plot(막대그래프)

In [1]: import pandas as pd pd.set_option('display.max_columns',500) #생략없이 모두 출력 In [2]: marathon_2015 = pd.read_csv("C://Users//82106//Desktop//boston-results//marathon_results_2015.csv") marathon_2016 = pd.read_csv("C://Users//82106//Desktop//boston-results//marathon_results_2016.csv") marathon_2017 = pd.read_csv("C://Users//82106//Desktop//boston-results//marathon_results_2017.csv") b..

[Python]파이썬 데이터 전처리 기초 정리

데이터는 Kaggle에 있는 bostan marathon 데이터를 참고했다. 데이터 불러오기부터 저장까지 아주아주아주아주아주아주 기초가 되는 전처리 방법 정리 https://www.kaggle.com/rojour/boston-results Finishers Boston Marathon 2015, 2016 & 2017 This data has the names, times and general demographics of the finishers www.kaggle.com In [1]: import pandas as pd In [12]: #load the csv file marathon_2015 = pd.read_csv("C://Users//User//Desktop//boston-results/marath..

[Python] sklearn.pipeline, 파이프라인(Pipeline)이란 ?

대부분의 기계 학습 데이터는 최종 모델을 만드는데 있어서 이상적인 형식이 아니다. 범주형 변수를 조작하거나 스케일링 및 정규화와 같은 많은 데이터 변환이 수행되어야 한다. Scikit-Learn은 전처리 기능에 일반적으로 사용되는 대부분의 기능을 내장하고 있다. 그러나 일반적인 기계 학습 워크플로우에서는 이러한 모든 변환을 두 번 이상 적용해야 한다. 모델을 교육할 때 한 번 그리고 예측하고자 하는 모든 새로운 데이터에 대해 다시 한 번하기 때문이다. 물론 재사용하는 기능을 쓸 수 있지만 먼저 실행하고 나서 모델을 따로 불러야 할 것이다. Scikit-Learn pipeline은 이 과정을 단순화하는 도구로써 다음과 같은 몇 가지 주요 이점이 있다. 파이프라인을 사용하면 데이터 사전 처리 및 분류의 모든..

[Python]Java is not installed, or the Java executable is not on system path

Python으로 PMML Model import 하는 과정 중에 JAVA가 계속 설치 안되어있다고 오류 메세지가 났다. 아니, 자바 설치했다고요... 왜 설치 안됐냐고 말하냐고요... 구글링 열심히 해보니까 path 때문에 안되었다고 한다. 그래서 먼저 java path 설정하기 내 PC 오른쪽 버튼 클릭해서 속성 -> 고급 시스템 설정 -> 고급 탭 -> 환경변수 환경 변수 보면 JAVA_HOME으로 새로 만들어주고 java 설치 되어있는 directory로 값 설정해주었다. 그리고 나서 Path에다가도 %JAVA_HOME%\bin을 추가 해주었다. 이와 똑같은 방법으로 Anaconda3도 환경 변수 설정해주고 컴퓨터 재부팅 ! 나는 자바 설치 할때 path 설정했는데 아마 재부팅 안해서 오류났던 것 ..

반응형