Social Computing and Big Data Analytics 社群運算與大數據分析 1 1042SCBDA05 MIS MBA (M2226) (8628) Wed, 8,9, (15:10-17:00) (B309) Big Data Analytics with Numpy in.

Slides:



Advertisements
Similar presentations
Social Media Marketing Research 社會媒體行銷研究 SMMR08 TMIXM1A Thu 7,8 (14:10-16:00) L511 Exploratory Factor Analysis Min-Yuh Day 戴敏育 Assistant Professor.
Advertisements

Case Study for Information Management 資訊管理個案
Social Media Marketing Analytics 社群網路行銷分析 SMMA02 TLMXJ1A (MIS EMBA) Fri 12,13,14 (19:20-22:10) D326 社群網路行銷分析 (Social Media Marketing Analytics) Min-Yuh.
FGU LDT. FGU EIS 96 ‧ 8 ‧ 25 FGU LDT 佛光大學學習與數位科技學系.
大華技術學院九十五學年度 資工系計算機概論教學大綱 吳弘翔. Wu Hung-Hsiang2 科目名稱:計算機概論與實習 授課老師:吳弘翔 學分數: 4 修別:必修 老師信箱:
報告人:陳錦生 校長 日 期: 99 年 10 月 21 日. 自我評鑑報告內容簡介 校務評鑑五大項目 自我評鑑過程 簡述自我評鑑過程 學校現況 校地、教職員生數、圖書冊數、院系所學位學程.
商業智慧實務 Practices of Business Intelligence BI04 MI4 Wed, 9,10 (16:10-18:00) (B113) 資料倉儲 (Data Warehousing) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授.
Case Study for Information Management 資訊管理個案
Social Media Marketing Research 社會媒體行銷研究 SMMR01 TMIXM1A Thu 7,8 (14:10-16:00) U505 Course Orientation for Social Media Marketing Research Min-Yuh.
Social Media Marketing Research 社會媒體行銷研究 SMMR06 TMIXM1A Thu 7,8 (14:10-16:00) L511 Measuring the Construct Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授.
企業網路系統研究 (Enterprise Networking Systems Research) (VMware vSphere) VM01 MI4 Thu 9,10 (16:10-18:00) (B310) Course Introduction ( 課程介紹 ) Min-Yuh Day.
社會媒體服務專題 Special Topics in Social Media Services 淡江大學 淡江大學 資訊管理學系 資訊管理學系 Dept. of Information ManagementDept. of Information Management, Tamkang UniversityTamkang.
Social Media Marketing 社群網路行銷 SMM09 TLMXJ1A (MIS EMBA) Mon 12,13,14 (19:20-22:10) D504 行動 APP 行銷 (Mobile Apps Marketing) Min-Yuh Day 戴敏育 Assistant.
Web Mining ( 網路探勘 ) WM12 TLMXM1A Wed 8,9 (15:10-17:00) U705 Web Usage Mining ( 網路使用挖掘 ) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information.
Social Media Marketing Management 社會媒體行銷管理 SMMM06 TLMXJ1A Tue 12,13,14 (19:20-22:10) D325 行銷理論 (Marketing Theories) Min-Yuh Day 戴敏育 Assistant Professor.
Business Intelligence Trends 商業智慧趨勢 BIT08 MIS MBA Mon 6, 7 (13:10-15:00) Q407 商業智慧導入與趨勢 (Business Intelligence Implementation and Trends) Min-Yuh.
Social Media Management 社會媒體管理 SMM06 TMIXM1A Fri. 7,8 (14:10-16:00) L215 Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information Management,
Social Media Management 社會媒體管理 SMM01 TMIXM1A Fri. 7,8 (14:10-16:00) L215 Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information Management,
Social Media Marketing Management 社會媒體行銷管理
Social Media Marketing 社群網路行銷 SMM05 TLMXJ1A (MIS EMBA) Mon 12,13,14 (19:20-22:10) D504 社群網路行銷蜻蜓效應 (The Dragonfly Effect of Social Media Marketing)
Case Study for Information Management 資訊管理個案 CSIM4B07 TLMXB4B (M1824) Tue 2, 3, 4 (9:10-12:00) B502 Telecommunications, the Internet, and Wireless.
Social Media Marketing 社群網路行銷 SMM08 TLMXJ1A (MIS EMBA) Mon 12,13,14 (19:20-22:10) D504 社群網路行銷計劃 (Social Media Marketing Plan) Min-Yuh Day 戴敏育 Assistant.
Special Topics in Social Media Services 社會媒體服務專題 1 992SMS07 TMIXJ1A Sat. 6,7,8 (13:10-16:00) D502 Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information.
Data Mining 資料探勘 Introduction to Data Mining 資料探勘導論 Min-Yuh Day 戴敏育
商業智慧實務 Practices of Business Intelligence BI01 MI4 Wed, 9,10 (16:10-18:00) (B113) 商業智慧導論 (Introduction to Business Intelligence) Min-Yuh Day 戴敏育.
Social Media Marketing Management 社會媒體行銷管理 SMMM12 TLMXJ1A Tue 12,13,14 (19:20-22:10) D325 確認性因素分析 (Confirmatory Factor Analysis) Min-Yuh Day 戴敏育.
Social Media Marketing Analytics 社群網路行銷分析 SMMA04 TLMXJ1A (MIS EMBA) Fri 12,13,14 (19:20-22:10) D326 測量構念 (Measuring the Construct) Min-Yuh Day 戴敏育.
Case Study for Information Management 資訊管理個案 CSIM4C02 TLMXB4C (M1824) Tue 2, 3, 4 (9:10-12:00) B425 Information Systems in Global Business: UPS (Chap.
商業智慧實務 Practices of Business Intelligence BI06 MI4 Wed, 9,10 (16:10-18:00) (B130) 資料科學與巨量資料分析 (Data Science and Big Data Analytics) Min-Yuh Day 戴敏育.
Social Media Marketing Research 社會媒體行銷研究 SMMR09 TMIXM1A Thu 7,8 (14:10-16:00) L511 Confirmatory Factor Analysis Min-Yuh Day 戴敏育 Assistant Professor.
Case Study for Information Management 資訊管理個案 CSIM4B08 TLMXB4B Thu 8, 9, 10 (15:10-18:00) B508 Securing Information System: 1. Facebook, 2. European.
Case Study for Information Management 資訊管理個案 CSIM4B03 TLMXB4B (M1824) Tue 3,4 (10:10-12:00) L212 Thu 9 (16:10-17:00) B601 Global E-Business and Collaboration:
Case Study for Information Management 資訊管理個案
商業智慧實務 Practices of Business Intelligence BI01 MI4 Wed, 9,10 (16:10-18:00) (B130) 商業智慧導論 (Introduction to Business Intelligence) Min-Yuh Day 戴敏育.
Social Media Marketing Management 社會媒體行銷管理
Social Media Marketing 社群網路行銷 SMM02 TLMXJ1A (MIS EMBA) Mon 12,13,14 (19:20-22:10) D504 社群網路商業模式 (Business Models of Social Media) Min-Yuh Day 戴敏育.
商業智慧實務 Practices of Business Intelligence
Business Intelligence Trends 商業智慧趨勢 BIT01 MIS MBA Mon 6, 7 (13:10-15:00) Q407 Course Orientation for Business Intelligence Trends 商業智慧趨勢課程介紹 Min-Yuh.
Data Mining 資料探勘 DM04 MI4 Wed, 6,7 (13:10-15:00) (B216) 分群分析 (Cluster Analysis) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information Management,
Social Media Marketing Management 社會媒體行銷管理 SMMM01 TLMXJ1A Tue 12,13,14 (19:20-22:10) D325 Course Orientation of Social Media Marketing Management.
Web Mining ( 網路探勘 ) WM06 TLMXM1A Wed 8,9 (15:10-17:00) U705 Information Retrieval and Web Search ( 資訊檢索與網路搜尋 ) Min-Yuh Day 戴敏育 Assistant Professor.
Social Media Marketing Research 社會媒體行銷研究 SMMR04 TMIXM1A Thu 7,8 (14:10-16:00) L511 Marketing Research Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授.
Data Mining 資料探勘 DM01 MI4 Wed, 6,7 (13:10-15:00) (B216) Introduction to Data Mining ( 資料探勘導論 ) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of.
Data Mining 資料探勘 Introduction to Data Mining (資料探勘導論) Min-Yuh Day 戴敏育
Case Study for Information Management 資訊管理個案
Big Data Mining 巨量資料探勘 DM01 MI4 (M2244) (3094) Tue, 3, 4 (10:10-12:00) (B216) Course Orientation for Big Data Mining ( 巨量資料探勘課程介紹 ) Min-Yuh Day 戴敏育.
Social Computing and Big Data Analytics 社群運算與大數據分析
巨量資料基礎: MapReduce典範、Hadoop與Spark生態系統
社群網路行銷管理 Social Media Marketing Management SMMM01 MIS EMBA (M2200) (8615) Thu, 12,13,14 (19:20-22:10) (D309) 社群網路行銷管理課程介紹 (Course Orientation for.
Social Computing and Big Data Analytics 社群運算與大數據分析
Social Computing and Big Data Analytics 社群運算與大數據分析 SCBDA02 MIS MBA (M2226) (8628) Wed, 8,9, (15:10-17:00) (Q201) Data Science and Big Data Analytics:
Social Computing and Big Data Analytics 社群運算與大數據分析 SCBDA06 MIS MBA (M2226) (8628) Wed, 8,9, (15:10-17:00) (B309) Finance Big Data Analytics with.
社群網路行銷管理 Social Media Marketing Management SMMM02 MIS EMBA (M2200) (8615) Thu, 12,13,14 (19:20-22:10) (D309) 社群網路商業模式 (Business Models of Social.
Social Computing and Big Data Analytics 社群運算與大數據分析 SCBDA10 MIS MBA (M2226) (8628) Wed, 8,9, (15:10-17:00) (B309) Deep Learning with Google TensorFlow.
社群網路行銷管理 Social Media Marketing Management SMMM03 MIS EMBA (M2200) (8615) Thu, 12,13,14 (19:20-22:10) (D309) 顧客價值與品牌 (Customer Value and Branding)
Social Computing and Big Data Analytics 社群運算與大數據分析
Social Computing and Big Data Analytics 社群運算與大數據分析
Big Data Mining 巨量資料探勘 DM05 MI4 (M2244) (3094) Tue, 3, 4 (10:10-12:00) (B216) 分群分析 (Cluster Analysis) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授.
Social Computing and Big Data Analytics 社群運算與大數據分析
Social Computing and Big Data Analytics 社群運算與大數據分析
Social Computing and Big Data Analytics 社群運算與大數據分析
Social Computing and Big Data Analytics 社群運算與大數據分析
Course Orientation for Big Data Mining (巨量資料探勘課程介紹)
Case Study for Information Management 資訊管理個案
Social Computing and Big Data Analytics 社群運算與大數據分析
分群分析 (Cluster Analysis)
大數據行銷研究 Big Data Marketing Research
商業智慧實務 Practices of Business Intelligence
Case Study for Information Management 資訊管理個案
Case Study for Information Management 資訊管理個案
Presentation transcript:

Social Computing and Big Data Analytics 社群運算與大數據分析 SCBDA05 MIS MBA (M2226) (8628) Wed, 8,9, (15:10-17:00) (B309) Big Data Analytics with Numpy in Python (Python Numpy 大數據分析 ) Min-Yuh Day 戴敏育 Assistant Professor 專任助理教授 Dept. of Information Management, Tamkang University Dept. of Information ManagementTamkang University 淡江大學 淡江大學 資訊管理學系 資訊管理學系 tku.edu.tw/myday/ Tamkang University

週次 (Week) 日期 (Date) 內容 (Subject/Topics) /02/17 Course Orientation for Social Computing and Big Data Analytics ( 社群運算與大數據分析課程介紹 ) /02/24 Data Science and Big Data Analytics: Discovering, Analyzing, Visualizing and Presenting Data ( 資料科學與大數據分析: 探索、分析、視覺化與呈現資料 ) /03/02 Fundamental Big Data: MapReduce Paradigm, Hadoop and Spark Ecosystem ( 大數據基礎: MapReduce 典範、 Hadoop 與 Spark 生態系統 ) 課程大綱 (Syllabus) 2

週次 (Week) 日期 (Date) 內容 (Subject/Topics) /03/09 Big Data Processing Platforms with SMACK: Spark, Mesos, Akka, Cassandra and Kafka ( 大數據處理平台 SMACK : Spark, Mesos, Akka, Cassandra, Kafka) /03/16 Big Data Analytics with Numpy in Python (Python Numpy 大數據分析 ) /03/23 Finance Big Data Analytics with Pandas in Python (Python Pandas 財務大數據分析 ) /03/30 Text Mining Techniques and Natural Language Processing ( 文字探勘分析技術與自然語言處理 ) /04/06 Off-campus study ( 教學行政觀摩日 ) 課程大綱 (Syllabus) 3

週次 (Week) 日期 (Date) 內容 (Subject/Topics) /04/13 Social Media Marketing Analytics ( 社群媒體行銷分析 ) /04/20 期中報告 (Midterm Project Report) /04/27 Deep Learning with Theano and Keras in Python (Python Theano 和 Keras 深度學習 ) /05/04 Deep Learning with Google TensorFlow (Google TensorFlow 深度學習 ) /05/11 Sentiment Analysis on Social Media with Deep Learning ( 深度學習社群媒體情感分析 ) 課程大綱 (Syllabus) 4

週次 (Week) 日期 (Date) 內容 (Subject/Topics) /05/18 Social Network Analysis ( 社會網絡分析 ) /05/25 Measurements of Social Network ( 社會網絡量測 ) /06/01 Tools of Social Network Analysis ( 社會網絡分析工具 ) /06/08 Final Project Presentation I ( 期末報告 I) /06/15 Final Project Presentation II ( 期末報告 II) 課程大綱 (Syllabus) 5

6 Source:

Yves Hilpisch, Python for Finance: Analyze Big Financial Data, O'Reilly, Source:

8 Source: Ivan Idris, Numpy Beginner's Guide, Third Edition Packt Publishing, 2015

9 Michael Heydt, Mastering Pandas for Finance, Packt Publishing, 2015 Source:

Python for Big Data Analytics 10 (The column on the left is the 2015 ranking; the column on the right is the 2014 ranking for comparison Source:

11 Source: Python: Analytics and Data Science Software

Python 12

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. 13 Source:

NumPy 14

NumPy is the fundamental package for scientific computing with Python. 15 Source:

Python versions (py2 and py3) Python released in 1991 (first release) Python 1.0 released in 1994 Python 2.0 released in 2000 Python 2.6 released in 2008 Python 2.7 released in 2010 Python 3.0 released in 2008 Python 3.3 released in 2010 Python 3.4 released in 2014 Python 3.5 released in Source: Yves Hilpisch (2014), Python for Finance: Analyze Big Financial Data, O'Reilly

Python (Python 2.7 & Python 3.5) Standard Syntax 17 Source: PyCon Australia (2014), Writing Python 2/3 compatible code by Edward Schofield Python 3Python 2

from __ future __ import Source: PyCon Australia (2014), Writing Python 2/3 compatible code by Edward Schofield Python 3Python 2

from future.builtins import * 19 Source: PyCon Australia (2014), Writing Python 2/3 compatible code by Edward Schofield Python 3Python 2

from past.builtins import * 20 Source: PyCon Australia (2014), Writing Python 2/3 compatible code by Edward Schofield Python 3Python 2

Anaconda 21

Download Anaconda 22

Download Anaconda Python

OS X Anaconda Installation 24

Anaconda MacOSX-x86_64.pkg 25 OS X Anaconda Installation

26 OS X Anaconda Installation

27 OS X Anaconda Installation

28 OS X Anaconda Installation

Install Anaconda 2: 165 packages included 29

30 OS X Anaconda Installation

31 OS X Anaconda Installation

32 OS X Anaconda Installation

33 OS X Anaconda Installation

34 OS X Anaconda Installation

35 OS X Anaconda Installation

36 OS X Anaconda Installation

37 OS X Anaconda Installation

conda list 38

39 conda --version

40 conda --version

41 python --version

ipython notebook 42

43 conda search python

44 conda create -n py35 python=3.5 anaconda Source: Create a Python 3.5 environment

45 Create a Python 3.5 environment y

46 Create a Python 3.5 environment

47 source activate py35

48 python --version

49 from platform import python_version print('Python Version:', python_version())

conda info --envs 50

51 conda --version python --version

52 py27 py35 conda info --envs

53 Source activate py35 conda install notebook ipykernel

54 conda install notebook ipykernel

55 conda install notebook ipykernel

56 Source activate py27 conda install notebook ipykernel

57 conda install notebook ipykernel

58 conda install notebook ipykernel

59 python --version

60 source deactivate

61 ipython notebook

62

63 jupyter notebook Python 3

64 jupyter notebook Python 3

65 jupyter notebook Python 2

66 jupyter notebook Python 2

67 ipython notebook jupyter notebook

68 jupyter notebook

69 jupyter notebook

print(‘Hello World, Python’) 70

71 print(‘Hello World, Python’)

Anaconda Cloud 72

73 Anaconda Cloud

Conda Get-Started 74

Update or Upgrade Python 75 If you are in an environment with Python version 3.4.2, this command will update Python to 3.4.3, which is the latest version in the 3.4 branch: $ conda update python Upgrade Python to another branch such as 3.5 by installing that version of Python: $ conda install python=3.5

Python–Future 76

pip install future pip install six 77 import future # pip install future import builtins # pip install future import past # pip install future import six # pip install six The imports below refer to these pip-installable packages on PyPI: futurize # pip install future pasteurize # pip install future

print 78 # Python 2 only: print 'Hello’ # Python 2 and 3: print('Hello') # Python 2 only: print 'Hello', 'Guido’ # Python 2 and 3: from __future__ import print_function #(at top of module) print('Hello', 'Guido')

Writing Python 2-3 compatible code Essential syntax differences 79

80 # Python 2 only s1 = 'The Zen of Python' s2 = u' きたないのよりきれいな方がいい \n' # Python 2 and 3 s1 = u'The Zen of Python' s2 = u' きたないのよりきれいな方がいい \n' Unicode (text) string literals

81 # Python 2 and 3 from __future__ import unicode_literals # at top of module s1 = 'The Zen of Python' s2 = ' きたないのよりきれいな方がいい \n' Unicode (text) string literals

82 Source:

Text input and output 83 Source: name = input("Enter a name: ") x = int(input("What is x? ")) x = 2 y = 3 print(x, ' ', y) x = 3 print(x) print("Hello World") print("Hello World\nThis is a message") x = float(input("Write a number"))

Variables 84 Source: x = 2 price = 2.5 word = 'Hello' x = 2 x = x + 1 x = 5 word = 'Hello' word = "Hello" word = '''Hello'''

Python Basic Operators 85 print('7 + 2 =', 7 + 2) print('7 - 2 =', 7 - 2) print('7 * 2 =', 7 * 2) print('7 / 2 =', 7 / 2) print('7 // 2 =', 7 // 2) print('7 % 2 =', 7 % 2) print('7 ** 2 =', 7 ** 2)

BMI Calculator in Python 86 height_cm = float(input("Enter your height in cm: ")) weight_kg = float(input("Enter your weight in kg: ")) height_m = height_cm/100 BMI = (weight_kg/(height_m**2)) print("Your BMI is: " + str(round(BMI,1))) Source:

If statements 87 Source: > greater than < smaller than == equals != is not score = 80 if score >=60 : print("Pass") else: print("Fail")

For loops 88 Source: for i in range(1,11): print(i)

For loops 89 Source: for i in range(1,10): for j in range(1,10): print(i, ' * ', j, ' = ', i*j) 9 * 1 = 9 9 * 2 = 18 9 * 3 = 27 9 * 4 = 36 9 * 5 = 45 9 * 6 = 54 9 * 7 = 63 9 * 8 = 72 9 * 9 = 81

Functions 90 def convertCMtoM(xcm): m = xcm/100 return m cm = 180 m = convertCMtoM(cm) print(str(m)) 1.8

Lists 91 x = [60, 70, 80, 90] print(len(x)) print(x[0]) print(x[1]) print(x[-1])

Tuples 92 x = (10, 20, 30, 40, 50) print(x[0]) print(x[1]) print(x[2]) print(x[-1]) A tuple in Python is a collection that cannot be modified. A tuple is defined using parenthesis. Source:

93 Python Ecosystem

Python Ecosystem import math 94 math.log?

NumPy NumPy provides a multidimensional array object to store homogenous or heterogeneous data; it also provides optimized functions/methods to operate on this array object. 95 Source: Yves Hilpisch (2014), Python for Finance: Analyze Big Financial Data, O'Reilly

v = range(1, 6) print(v) 2 * v import numpy as np v = np.arange(1, 6) v 2 * v 96 NumPy Source: Yves Hilpisch (2014), Python for Finance: Analyze Big Financial Data, O'Reilly

97

Compatible Python 2 and Python 3 Code 98 Source: DrapsTV (2016), Compatible Python 2 & 3 Code print() Exceptions Division Unicode strings Bad imports

Compatible Python 2 and Python 3 Code 99 Source: DrapsTV (2016), Compatible Python 2 & 3 Code print() print(“This works in py2 and py3”) from __future__ import print_function print(“Hello”, “World”)

What version of Python should I choose? The latest version of Python 2 is 2.7, and that is included with Anaconda and Miniconda. The newest stable version of Python is 3.5, and that is included with Anaconda3 and Miniconda3. You can easily set up additional versions of Python such as 3.4 by downloading any version and creating a new environment with just a few clicks. 100 Source:

Create Python 2 or 3 environments 101 Source:

File IO with open() # Python 2 only f = open('myfile.txt') data = f.read() # as a byte string text = data.decode('utf-8') # Python 2 and 3: alternative 1 from io import open f = open('myfile.txt', 'rb') data = f.read() # as bytes text = data.decode('utf-8') # unicode, not bytes # Python 2 and 3: alternative 2 from io import open f = open('myfile.txt', encoding='utf-8') text = f.read() # unicode, not bytes

Six: Python 2 and 3 Compatibility Library 103

Conda Test Drive 104

Managing Conda and Anaconda 105

106 Managing environments

107 Managing Python

108 Managing Packages in Python

PyCharm: Python IDE 109

References Yves Hilpisch (2014), Python for Finance: Analyze Big Financial Data, O'Reilly Ivan Idris (2015), Numpy Beginner's Guide, Third Edition, Packt Publishing 110