본문 바로가기

machine learning

(8)
[구글 클라우드] 텐서플로우를 활용한 Babyweight 예제 (source : GCP qwiklabs) 버킷생성 1. 버킷 생성 : Navigation menu> Storage > [Create a standard bucket] 2. Babyweight 데이터세트를 스토리지 버킷에 복사 - Cloud Shell에서, 아래 명령어를 실행하여 사전 처리된 데이터세트를 내 버킷에 복사 - 부분을 위에서 생성한 버킷 이름으로 변경 gsutil cp gs://cloud-training-demos/babyweight/preproc/* gs:///babyweight/preproc/ (결과화면) TensorBoard 설정 + AI Platform Notebooks 생성 3. Cloud Shell에서, TensorBoard를 지원하는 Cloud AI Platform Noteboo..
[구글 클라우드] 텐서플로우를 활용한 머신러닝 예제 (source : GCP qiwklabs) AI Platform Notebooks 생성 1. Navigation Menu > AI Platform > Notebooks 클릭 2. 인스턴스 생성 : NEW INSTANCE 클릭 - Tensorflow Enterprise 1.15 > Without GPUs 선택 3. 팝업창이 뜨면 딥러닝 VM 이름을 입력/확인 하고 Create 클릭 (VM 생성까지 2~3분 정도 소요될 수 있음) 4. Open JupyterLab 클릭 > JupyterLab Window가 새창으로 열림 Datalab instance에 학습용 repo 복제 - training-data-analyst 를 내 JupyterLab 인스턴스에 복제 1. JupyterLab 에서 터미널 아이콘(Ter..
[구글 클라우드] TensorFlow 스케일링 - AI Platform Training 서비스 활용 (source : GCP qwiklabs) - Jupyter Notebook 실습 코드 - Jupyter Notebook 실습 코드 : 정답 포함 TensorBoard 설정 + AI Platform Notebooks 생성 1. Cloud Shell에서, TensorBoard를 지원하는 Cloud AI Platform Notebook 인스턴스를 생성 export IMAGE_FAMILY="tf-1-14-cpu" export ZONE="us-west1-b" export INSTANCE_NAME="tf-tensorboard-1" export INSTANCE_TYPE="n1-standard-4" gcloud compute instances create "${INSTANCE_NAME}" \ --zone="${ZON..
[구글 클라우드] 분산 학습 TensorFlow 모델 (Estimator API 사용) (source : GCP qwiklabs) - Jupyter Notebook 실습 코드 - Jupyter Notebook 실습 코드 : 정답 포함 1. 패키지 import from google.cloud import bigquery import tensorflow as tf import numpy as np import shutil print(tf.__version__) 2. 입력 CSV_COLUMNS = ['fare_amount', 'pickuplon','pickuplat','dropofflon','dropofflat','passengers', 'key'] LABEL_COLUMN = 'fare_amount' DEFAULTS = [[0.0], [-74.0], [40.0], [-74.0], [40.7], ..
[구글 클라우드] 배치 기반 TensorFlow 스케일업 (source : GCP qwiklabs) - Jupyter Notebook 실습 코드 - Jupyter Notebook 실습 코드 : 정답 포함 1. 패키지 import from google.cloud import bigquery import tensorflow as tf import numpy as np import shutil print(tf.__version__) 2. 입력 Refactor - Dataset API를 사용하여 데이터가 미니 배치로 모델에 전달 될 때, 필요할 때만 디스크에서 로드됨 CSV_COLUMNS = ['fare_amount', 'pickuplon','pickuplat','dropofflon','dropofflat','passengers', 'key'] DEFAULTS = [..
[구글 클라우드] Estimator API 사용해서 AI 모델 구현 (TensorFlow) (source : GCP qwiklabs) AI Platform Notebooks 생성 1. Navigation Menu > AI Platform > Notebooks 클릭 2. 인스턴스 생성 : NEW INSTANCE 클릭 - Tensorflow Enterprise 1.15 > Without GPUs 선택 3. 팝업창이 뜨면 딥러닝 VM 이름을 입력/확인 하고 Create 클릭 (VM 생성까지 2~3분 정도 소요될 수 있음) 4. Open JupyterLab 클릭 > JupyterLab Window가 새창으로 열림 Datalab instance에 학습용 repo 복제 - training-data-analyst 를 내 JupyterLab 인스턴스에 복제 1. JupyterLab 에서 터미널 아이콘(Ter..
Confusion matrix와 주요 성능지표 산출식 Precision(정확도)와 Recall(재현율), Accuracy, and etc. 는 알고리즘 및 Machine Learning 모델의 성능을 평가하는 지표로 많이 사용되고, Confusion Matrix는 Training 을 통한 Prediction 성능을 측정하기 위해 예측 value와 실제 value를 비교하기 위한 표를 일컫는다. ■ 성능지표 및 용어 설명 용어 산출식 설명 예 Accuracy (TP+TN)/(TP+TN+FP+FN) 탐지율 : 맞게 검출한 비율 실제 악성/정상인지 맞게 예측한 비율 Precision TP/(TP+FP) 정확도 : P로 검출한 것중 실제P의 비율 악성으로 예측한것 중 실제 악성인 샘플의 비율 Recall TP/(TP+FN) 재현율 : 실제 P를 P로 예측한 비율 ..
Data Science & Machine Learning 관련 Coursera 추천 강의 리스트 데이터 과학과 관련된 Coursera 강의 및 Machine Learning 관련 추천 강의 리스트 Machine Learning by Stanford University - Schedule : 11 Weeks- Instructors : Andrew Ng- Link : https://www.coursera.org/learn/machine-learning/코세라 창업자이자 Machine Learning 의 4대 천황이라 알려진 앤드류 응(Andrew Ng) 교수가 직접 강의하는 코스로 Machine Learning 기본 개념을 쉽게 이해할 수 있다. The Data Scientist’s Toolboxby Johns Hopkins University - Schedule : 2016 March 14 ~ Apr..