6. 탐색/분석 데이터 확보
파일질라(FTP) 실행 > Server02 접속 > 파일 다운로드
- 다운로드 경로: /home/pilot-pjt/mahout-data/classification/input
- 다운로드 파일: classification_data.txt
- 다운로드 위치: D://data/
Step-1
파이썬 홖경 구성 및 실행
윈도우 시작 메뉴 > Anaconda Prompt 실행
> Activate py35
> conda install seaborn
> jupyter notebook
Step-2
Jupyter Notebook 생성
Jupyter Home > New > Python 3 실행
Step-3
7. 라이브러리 Import
import os.path
import pandas as pd
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import seaborn as sns
from sklearn import preprocessing
Step-4
분석 데이터 로드
df= pd.read_csv("D://data/classification_dataset.txt", names = ["sex", "age", "marriage", "region", "job",
"car_capacity", "car_year", "car_model", "tire_fl", "tire_fr", "tire_bl", "tire_br", "light_fl", "light_fr",
"light_bl", "light_br", "engine_s", "break_s", "battery_s", "result"])
df.head()
Step-5
미분석 항목 제외
df = df.drop(['sex','age','marriage','region','job','car_model'], axis =1)
df.head()
Step-6