雲端計算.

Slides:



Advertisements
Similar presentations
作業 : list  stack struct node {int info; node* next; }; class list { node *head, *tail ; int node_no ; public: list() ;list(const node& n) ;list(const.
Advertisements

FCU, Department of ECE, IC Design Research Lab. TEL: # 4945 Pre-SIm , Post-Sim.
Divide-and-Conquer. 什麼是 divide-and-conquer ? Divide 就是把問題分割 Conquer 則是把答案結合起來.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
: Arrange the Numbers ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 11481: Arrange the Numbers 解題者:李重儀 解題日期: 2008 年 9 月 13 日 題意: 將數列 {1,2,3, …,N}
Section 1.2 Describing Distributions with Numbers 用數字描述分配.
Instructor: Ching-Chi Lin 林清池 助理教授
序列分析工具:MDDLogo 謝勝任 林宗慶 指導教授:李宗夷 教授.
計算機概論 - 搜尋 1 Ming-Shang Lee CopyRight 2001 搜尋 (Searching) 李明山 編撰.
Android Class vs. Jar 建國科技大學 資管系 饒瑞佶 2013/4 V1. 從 MyAndroidProject 專案改起 將 BMI_method.java 改寫成 class 方式 步驟 1 :在原 package 內新增一個 class.
CH-23 失效原因樹分析 FTA Failure Tree Analysis. 前言 為了提昇系統可靠度,產品在開發階段,利 用類似品管方法之魚骨圖分析手法,找出潛在 缺點,並加以改進,此種分析方法稱之為失效 原因樹分析法 (Failure Tree Analysis)– FTA 。 FTA 是一種系統化的方法,可以有效的找出.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 參 實驗法.
: Factstone Benchmark ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: : Factstone Benchmark 解題者:鐘緯駿 解題日期: 2006 年 06 月 06 日 題意: 假設 1960.
:New Land ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11871: New Land 解題者:施博修 解題日期: 2011 年 6 月 8 日 題意:國王有一個懶兒子,為了勞動兒子,他想了一個 辦法,令他在某天早上開始走路,直到太陽下山前,靠.
Chapter 2 聯立線性方程式與矩陣 緒言 線性方程式組 (systems of linear equations) 出現 在多數線性模式 (linear model) 中。根據以往解 題的經驗,讀者們也許已發現方程式的解僅與 該方程式的係數有關,求解的過程也僅與係數 的運算有關,只要係數間的相關位置不改變,
: Matrix Decompressing ★★★★☆ 題組: Contest Volumes with Online Judge 題號: 11082: Matrix Decompressing 解題者:蔡權昱、劉洙愷 解題日期: 2008 年 4 月 18 日 題意:假設有一矩陣 R*C,
JAVA 程式設計與資料結構 第十四章 Linked List. Introduction Linked List 的結構就是將物件排成一列, 有點像是 Array ,但是我們卻無法直接經 由 index 得到其中的物件 在 Linked List 中,每一個點我們稱之為 node ,第一個 node.
Course 0 課程介紹 Introduction
Concept Map – whatwhat, why and how?whyhow. What is Concept Mapping ?  Concept mapping is a technique for representing knowledge in graphs. Knowledge.
Canonical Correlation 典型相關 目標 1 – 決定兩組變數 ( 對相同事務的衡量 ) 是否獨立, 或決定這兩組變數之間關係的強度 –Example: Y1+Y2+…+Ym=X1+X2+…Xn ( 一般式 ) Y1, Y2,…Ym 是否與 X1, X2,..,Xn 有相關 / 無相關.
Chapter 1 General Probability Theory. 1.1 Infinite Probability Spaces Finite Infinite –Counterable (enumerate) –Uncounterable (real 、無理數 )
中央大學。范錚強 1 從 ER 到 Logical Schema ── 兼談 Schema Integration 國立中央大學 資訊管理系 范錚強 2005.
8.1 何謂高度平衡二元搜尋樹 8.2 高度平衡二元搜尋樹的加入 8.3 高度平衡二元搜尋樹的刪除
1 Chemical and Engineering Thermodynamics Chapter 8 Phase equilibrium in mixtures Parts B : Illustration Sandler.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
: Abundance and Perfect Numbers ★★★★☆ 題組: Contest Volumes with Online Judge 題號: 10914: Abundance and Perfect Numbers 解題者:劉洙愷 解題日期: 2008 年 5 月 2.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
計算機概論 - 排序 1 排序 (Sorting) 李明山 編撰 ※手動換頁.
7 陣列與搜尋 7.1 陣列 一般資料變數 宣告一維陣列 起始一維陣列 7-4
基準特徵 基準面 基準座標系 基準點 基準線 基準軸 基準特徵顯示之控制. 基準特徵 基準面 基準座標系 基準點 基準線 基準軸 基準特徵顯示之控制.
: Happy Number ★ ? 題組: Problem Set Archive with Online Judge 題號: 10591: Happy Number 解題者:陳瀅文 解題日期: 2006 年 6 月 6 日 題意:判斷一個正整數 N 是否為 Happy Number.
: Fast and Easy Data Compressor ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10043: Fast and Easy Data Compressor 解題者:葉貫中 解題日期: 2007 年 3.
Robust Invisible Watermarking of Volume Data Using the 3D DCT Yinghui Wu, Xin Guan,Mohan S.Kankanhalli,and Zhiyong Huang.
第三章 自動再裝載運用篇 使用時機:裝載計劃完成時,尚有剩餘空 間的情形,維持已固定計劃而繼續做裝載 最佳化。以支持次日裝載計劃而提前調整 作業模式。 裝載物品設定和裝載容器設定如前兩章介 紹,於此不再重複此動作,直接從裝載計 劃設定開始,直接從系統內定的物品和容 器選取所需.
第十章 再論結構. 指標與結構的關係 /* File name: ex10-1a.c */ #include int main() { struct student { char *name; int score; }; struct student st= {"Brian", 97}; struct.
Distributed Video Coding. Outline Distributed video coding Lossless compression Lossy compression Low complexity video encoding Distributed image coding.
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
: Placing Lampposts ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10859: Placing Lampposts 解題者:陳志瑜 解題日期: 2011 年 5 月 10 日 題意:美化為 Dhaka City.
資料結構實習-一 參數傳遞.
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/25 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH 2.4~CH 2.6 &
Analyzing Case Study Evidence
JAVA 程式設計與資料結構 第二十章 Searching. Sequential Searching Sequential Searching 是最簡單的一種搜尋法,此演 算法可應用在 Array 或是 Linked List 此等資料結構。 Sequential Searching 的 worst-case.
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
Review of Chapter 9 張啟中. Inheritance Hierarchy Min PQ Max PQ Min Heap Mergeable Min PQ DeapMin-Max Min-LeftistMin-SkewMinFHeap MinBHeap DEPQMax Heap Symmetric.
Linguistics phonetic symbols. 先下載 IPA 字型檔案,執行安裝。 由於這個程式的字型目錄設定錯誤, 所以等重新開機時就會發現字型消失。 所以必須根據以下步驟來讓 Windows 加入 IPA 字型。
Structural Equation Modeling Chapter 6 CFA 根據每個因素有多重指標,以減少 測量誤差並可建立問卷的構念效度 驗證性因素分析.
DECISION TREE LEARNING. Outlook Sunny Overcast Rain Humidity Yes Wind High Normal Strong Weak No Yes No Yes.
Chapter 10 m-way 搜尋樹與B-Tree
時間序列 Chap7 1 Chap 7 Decomposition method 4 components : Trend (TR t ) :長期向上或向下的移動趨勢 Seasonal variation (SN t ) :以年為基礎的變動原型 Cycle (CL t ) :在 2 到 10 年中向上或向下的改變.
Building a knowledge base for MIS research: A meta-analysis of a systems success model Mark I Hwang, John C Windsor, Alan Pryor Information Resources Management.
ArcINFO &Geodatabase 由 ESRI 產生 1970 ArcINFO 一開始被設計在迷你電 腦上, 後來逐漸發展, 在 UNIX 系統上也能 執行, 直到今天, 已經可以在不同的平台上 運作.
: Ordering Tasks ☆☆☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10305: Ordering Tasks 解題者:陳相廷 解題日期: 2006 年 6 月 12 日 題意:給定兩兩工作的先後關係,求出整體合 法執行順序。
Cluster Analysis 目的 – 將資料分成幾個相異性最大的群組 基本問題 – 如何衡量事務之間的相似性 – 如何將相似的資料歸入同一群組 – 如何解釋群組的特性.
中序轉後序 藉由由左向右掃瞄中序運算式產生後序運算式,遇到 運算元就直接輸出,遇到運算符號則先存入堆疊,將 優先權較高者輸出。 範例: a + b * c TokenStack [0] [1] [2] topoutput aa ++0a b+0ab *+ *1ab c+ *1abc eosabc*+
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/30 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH7.1~CH /12/26.
-Artificial Neural Network- Matlab操作介紹 -以類神經網路BPN Model為例
Visual C++重點複習.
資料結構實習-六.
: Vacation ★★★☆☆ 題組: Problem E 題號: 10192: Vacation 解題者:邱元甫、陳相廷 解題日期: 2006 年 3 月 25 日.
Concept Map – whatwhat, why and how?whyhow. Outline.
結構學 ( 一 ) 第八次作業 97/05/22. 題目一 題目一 (a) 先決定放鬆哪個束制,成為靜定結構 以支承 C 之水平反力為贅力,則 C 點滾支 承變成自由端,即形成靜定基元結構 C 點滿足變位諧和  Δ CH =0.
Discrete Mathematics Chapter 7 Advanced Counting Techniques 大葉大學 資訊工程系 黃鈴玲.
AN FP-SPLIT METHOD FOR FAST ASSOCIATION RULES MINING.
STRUCTURE 為一種複合式的資料型態,可用來把相關的資料組織 成為有意義的資料單元。 名片: name age tel namecard : char name[10]; int age; char tel[10] char [60]
Ajax 模組 timer 用法. 安裝 ASPAJAXExtSetup 編輯 ASP.NET 工具用.
雲端計算.
雲端計算.
雲端計算.
雲端計算.
Presentation transcript:

雲端計算

Tensorflow Python 3.5 class Create a minimal set of features that performs just as well as a more complex feature set Python 3.5 class

Tensorflow

https://download. mlcc. google https://download.mlcc.google.cn/mledu-datasets/california_housing_train.csv

Load the necessary libraries and import data from __future__ import print_function import math from IPython import display from matplotlib import cm from matplotlib import gridspec from matplotlib import pyplot as plt import numpy as np import pandas as pd from sklearn import metrics import tensorflow as tf from tensorflow.python.data import Dataset tf.logging.set_verbosity(tf.logging.ERROR) pd.options.display.max_rows = 10 pd.options.display.float_format = '{:.1f}'.format california_housing_dataframe = pd.read_csv("california_housing_train.csv", sep=",") california_housing_dataframe = california_housing_dataframe.reindex( np.random.permutation(california_housing_dataframe.index))

Prepares input features from data set def preprocess_features(california_housing_dataframe): selected_features = california_housing_dataframe[ [“latitude”, “longitude”, “housing_median_age”, "total_rooms", “total_bedrooms”, “population”, “households”, "median_income"]] processed_features = selected_features.copy() # Create a synthetic feature. processed_features["rooms_per_person"] = ( california_housing_dataframe["total_rooms"] / california_housing_dataframe["population"]) return processed_features 複製selected features 加入新的feature

Prepares target features (labels) from data set def preprocess_targets(california_housing_dataframe): output_targets = pd.DataFrame() # Scale the target to be in units of thousands of dollars. output_targets["median_house_value"] = ( california_housing_dataframe["median_house_value"] / 1000.0) return output_targets 建立空的 Daraframe 定義target feature

Training set Choose the first 12000 examples, out of the total of 17000. training_examples = preprocess_features(california_housing_dataframe.head(12000)) print(training_examples.describe()) 把前12000筆資料當作training set

Training targets (Label) Choose the first 12000 examples, out of the total of 17000. training_targets = preprocess_targets(california_housing_dataframe.head(12000)) print(training_targets.describe())

 Validation set Choose the last 5000 examples, out of the total of 17000. validation_examples = preprocess_features(california_housing_dataframe.tail(5000)) print(validation_examples.describe()) 把最後5000筆資料當作Validation set

 Validation target Choose the last 5000 examples, out of the total of 17000. validation_targets = preprocess_targets(california_housing_dataframe.tail(5000)) print(validation_targets.describe())

Correlation Correlation values : -1.0: perfect negative correlation 0.0: no correlation 1.0: perfect positive correlation

Correlation correlation_dataframe = training_examples.copy() correlation_dataframe["target"] = training_targets["median_house_value"] print(correlation_dataframe.corr()) 計算data的相關性 根據相關矩陣找出好的feature,移除不好的feature

Construct the tensorFlow feature columns def construct_feature_columns(input_features): """Construct the TensorFlow Feature Columns. Args: input_features: The names of the numerical input features to use. Returns: A set of feature columns """ return set([tf.feature_column.numeric_column(my_feature) for my_feature in input_features]) Name of numerical input features set():建立一個無序不重複元素的集合

Define input function def my_input_fn(features, targets, batch_size=1, shuffle=True, num_epochs=None): # Convert pandas data into a dict of np arrays. features = {key:np.array(value) for key,value in dict(features).items()} # Construct a dataset, and configure batching/repeating. ds = Dataset.from_tensor_slices((features,targets)) # warning: 2GB limit ds = ds.batch(batch_size).repeat(num_epochs) # Shuffle the data, if specified. if shuffle: ds = ds.shuffle(10000) # Return the next batch of data. features, labels = ds.make_one_shot_iterator().get_next() return features, labels

Train model

Training with good feature set minimal_features = [ "median_income", "latitude", ] minimal_training_examples = training_examples[minimal_features] minimal_validation_examples = validation_examples[minimal_features] _ = train_model( learning_rate=0.01, steps=500, batch_size=5, training_examples=minimal_training_examples, training_targets=training_targets, validation_examples=minimal_validation_examples, validation_targets=validation_targets)

Python 3.5 class

Class

Class - Inheritance

Class - override

驗收 Input Account Number, Account Name, Deposit and Withdraw. Use the “class” and “def” to store account number and name. Use the “class” and “def” to calculate your money. (Deposit – Withdraw = Balance)