SlideShare uma empresa Scribd logo
1 de 36
統計軟體實作與應用
Statistical Computing
徐峻賢
中央研究院語言學研究所
大腦與語言實驗室
a brief introduction of myself
• neurolinguistic studies of word recognition
• a database of Mandarin Chinese characters/words
• human perception in detecting F0 changes
• nonlinearity of brain waves and speech sounds
Cognitive
Psychology
Neuroscien
ce
Linguistics
Machine
Learning
Core
Abilitie
s
a brief introduction of myself
Computation Skills
1. Scripting in MATLAB, R, Python, UNIX, C.
2. Human Event-Related Potential (ERP) recording and analyses using Scan.
3. Source analysis and time-frequency analyses of EEG/MEG data using MNE toolbox and
Freesurfer.
4. EEG/MEG data analyses using fieldtrip toolbox
5. Conducting psychological experiments using Psychophysics Toolbox
6. Analyze/synthesize spoken sounds using Praat and STRAIGHT toolbox.
7. Machine Learning: GLM, SVM, & deep learning
8. Text Mining: LSA & word2vector
a brief introduction of myself
課程目標
• 將統計理論應用於資料分析。比如:
• 機率 >> 產生模擬數據
• 推論統計 >> 假設檢定 (Null Hypothesis
Significant test)
• 使用計算工具執行分析
• R & SPSS
• 不太可靠的大綱... (依據大家掌握 computing 的狀況
做調整)
• 機率 (隨機抽樣、中央極限定理)
• 描述統計 (類別量尺、連續量尺)
• 推論統計 (ttest, ANOVA, regression, chi-square)
• The number of analytics jobs available for R and SPSS
across time
• source: Muenchen @ http://r4stats.com/articles/popularity/
• The number of analytics jobs for the more popular
software (2/2014).
• source: Muenchen @ http://r4stats.com/articles/popularity/
• 不太可靠的大綱之 bonus hours:
• basics of machine learning
• word to vector
A B
Count 15251 15251
Average 100 100
Standard Deviation 20 20
Median 100.35 100.92
10 Percentile 73.89 73.95
90 Percentile 125.61 124.72
Descriptive statistics for two synthetic data sets
Prediction of time reference rating
There is an early and automatic semantic stimulus analysis wh
• Text Mining: word frequency
• http://tidytextmining.com/sentiment.html
• Text Mining: sentiment analysis
• http://tidytextmining.com/sentiment.html
• Pestian et al. (2011): Suicide Note Classification
Using Natural Language Processing: A Content
Analysis
• Data: Sixty-six notes were divided into two groups:
33 completers and 33 elicitors.
• 抓取首頁新聞,分為time,title,catagory,url儲存
• source: https://www.jerrynest.com/big-data-workshop-r-crawler/
library(rvest)
surl = "http://www.appledaily.com.tw/realtimenews/section/new/"
apple = read_html(surl,encoding="UTF-8")
apple %>% iconv(from = 'UTF-8', to = 'UTF-8')
rddt = apple %>% html_nodes('.rtddt')
time = rddt %>% html_nodes('time') %>% html_text()
title = rddt %>% html_nodes('h1') %>% html_text() %>% iconv(from = 'UTF-8', to = 'UTF-8')
category = rddt %>% html_nodes('h2') %>% html_text() %>% iconv(from = 'UTF-8', to = 'UTF-8')
domain = "http://www.appledaily.com.tw"
url = rddt %>% html_nodes('a') %>% html_attr('href')
url = paste0(domain, url)
news = data.frame(time=time, title=title, category=category, url=url)
news = data.frame(time=time, title=title, category=category, url=url)
R 統計軟體發展歷史
• R 統計軟體最初是由Ross Ihaka及Robert
Gentleman兩人以統計分析及繪圖為目的,
仿S語言的架構為基礎而發展出來的統計軟體
,可視為改進版本的S語言。大部分的S語言
程式碼可直接或稍做修改後就在R上面執行
• R屬於GNU計畫中的一個項目,目前是由 R
Development Core Team維護及發展
• 目前R最新的版本為3.1.1版(2014.07.10)
=
wizard
“R” 使用者就像巫師,他們使用統計學家研發的咒語,或者自行開發的指令。R使用者不用付
錢請統計學家工作,而且累積足夠的經驗之後,使用者會釋放無限的力量,改變統計分析的環
境 (就像鄧布利多那樣)。
R的特色及功能
• 有效的資料處理及存取能力
• 方便的矩陣操作與運算能力
• 簡單且發展完善的程式語言環境(S 語言)
– open source, 開放原始碼
• 活躍的咨詢社群
• 強迫使用者理解統計分析的步驟
•免費
R的缺點
• 圖形化界面較簡單 (相較於 SPSS, Excel…)
• 需要較長的學習時間
• 沒有公司/企業支援(不能客訴),使用者必須
自行克服問題(容易有挫折感)
• 常常在不知不覺中犯錯
– 要反覆檢查指令、輸出結果
• help 訊息幫助不大
• R 的主要操作界面
• 兩種視窗:
– Document (scripts)
– Console
最後,確認程式無誤
並且存入語法檔,將
來可以使用
• R程式IDE (Integrated development environment) 編
輯器: RStudio
• 回家作業:
• 安裝 R主程式 以及 Rstudio (Desktop Free version)
• 瀏覽一下 R 相關資源:
• R bloggers
• RPubs
• 吳漢銘教授的教學資源:
• http://www.hmwu.idv.tw/index.php/r-software
學習目標
• 初學者:
• 讀入外部資料,直接使用別人寫好的
packages/functions
• 讀入外部資料作資料處理/轉換/彙整
• 入門:
• 讀入外部資料,並作資料處理/轉換,再使用現有的
packages/functions 計算
• 修改他人所寫的packages/functions,以適用於自己的
資料分析任務
• 大師:
• 依照自己的特殊需求寫出全新的程式
如何使用計算工具?
• 和撰寫論文一樣:
– 研究動機與文獻探討
• 從R社群找過去的Q&A; 尋找可用的 package
– 方法
• 演算程序 (e.g., 公式、參數、ANOVA)
– 材料
• 讀取外部資料、自製模擬資料
– 程序
• 轉換資料、各種想像不到的細節…
– 結果與結論

Mais conteúdo relacionado

Semelhante a Statistical computing 00

IT445_Week_9.pdf
IT445_Week_9.pdfIT445_Week_9.pdf
IT445_Week_9.pdfAiondBdkpt
 
Python in word cloud
Python in word cloudPython in word cloud
Python in word cloudFEG
 
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...Etu Solution
 
用Weka多變項時間序列預測 (20170925) blog
用Weka多變項時間序列預測 (20170925)   blog用Weka多變項時間序列預測 (20170925)   blog
用Weka多變項時間序列預測 (20170925) blogYung-Ting Chen
 
Sphinx 全文检索实践指南
Sphinx 全文检索实践指南Sphinx 全文检索实践指南
Sphinx 全文检索实践指南Shaoning Pan
 
Information Retrieval
Information RetrievalInformation Retrieval
Information Retrievalyxyx3258
 
文献信息检索
文献信息检索文献信息检索
文献信息检索jimexifeng
 
第10章 Python计算生态.pptx
第10章 Python计算生态.pptx第10章 Python计算生态.pptx
第10章 Python计算生态.pptxedvardarcher
 
第九章千年之際展望語料庫語言學 佩娟15
第九章千年之際展望語料庫語言學 佩娟15第九章千年之際展望語料庫語言學 佩娟15
第九章千年之際展望語料庫語言學 佩娟15ungian iunn
 
網頁爬蟲入門 Python web crawler at 淡江大學 20170930
網頁爬蟲入門 Python web crawler at 淡江大學 20170930網頁爬蟲入門 Python web crawler at 淡江大學 20170930
網頁爬蟲入門 Python web crawler at 淡江大學 20170930Tim Hong
 
從統計到資料科學
從統計到資料科學從統計到資料科學
從統計到資料科學Terence Huang
 
01 课程介绍与计算机系统概述
01 课程介绍与计算机系统概述01 课程介绍与计算机系统概述
01 课程介绍与计算机系统概述Huaijin Chen
 
IT445_Week_8.pdf
IT445_Week_8.pdfIT445_Week_8.pdf
IT445_Week_8.pdfAiondBdkpt
 
搜索引擎技术介绍
搜索引擎技术介绍搜索引擎技术介绍
搜索引擎技术介绍bigqiang zou
 
Elastic stack day-1
Elastic stack day-1Elastic stack day-1
Elastic stack day-1YI-CHING WU
 

Semelhante a Statistical computing 00 (16)

IT445_Week_9.pdf
IT445_Week_9.pdfIT445_Week_9.pdf
IT445_Week_9.pdf
 
Python in word cloud
Python in word cloudPython in word cloud
Python in word cloud
 
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...
Big Data Taiwan 2014 Track1-3: Big Data, Big Challenge — Splunk 幫你解決 Big Data...
 
用Weka多變項時間序列預測 (20170925) blog
用Weka多變項時間序列預測 (20170925)   blog用Weka多變項時間序列預測 (20170925)   blog
用Weka多變項時間序列預測 (20170925) blog
 
Sphinx 全文检索实践指南
Sphinx 全文检索实践指南Sphinx 全文检索实践指南
Sphinx 全文检索实践指南
 
Information Retrieval
Information RetrievalInformation Retrieval
Information Retrieval
 
文献信息检索
文献信息检索文献信息检索
文献信息检索
 
第10章 Python计算生态.pptx
第10章 Python计算生态.pptx第10章 Python计算生态.pptx
第10章 Python计算生态.pptx
 
第九章千年之際展望語料庫語言學 佩娟15
第九章千年之際展望語料庫語言學 佩娟15第九章千年之際展望語料庫語言學 佩娟15
第九章千年之際展望語料庫語言學 佩娟15
 
網頁爬蟲入門 Python web crawler at 淡江大學 20170930
網頁爬蟲入門 Python web crawler at 淡江大學 20170930網頁爬蟲入門 Python web crawler at 淡江大學 20170930
網頁爬蟲入門 Python web crawler at 淡江大學 20170930
 
從統計到資料科學
從統計到資料科學從統計到資料科學
從統計到資料科學
 
01 课程介绍与计算机系统概述
01 课程介绍与计算机系统概述01 课程介绍与计算机系统概述
01 课程介绍与计算机系统概述
 
IT445_Week_8.pdf
IT445_Week_8.pdfIT445_Week_8.pdf
IT445_Week_8.pdf
 
從大數據走向人工智慧
從大數據走向人工智慧從大數據走向人工智慧
從大數據走向人工智慧
 
搜索引擎技术介绍
搜索引擎技术介绍搜索引擎技术介绍
搜索引擎技术介绍
 
Elastic stack day-1
Elastic stack day-1Elastic stack day-1
Elastic stack day-1
 

Mais de Kevin Chun-Hsien Hsu

Mais de Kevin Chun-Hsien Hsu (16)

[1062BPY12001] Data analysis with R / April 26
[1062BPY12001] Data analysis with R / April 26[1062BPY12001] Data analysis with R / April 26
[1062BPY12001] Data analysis with R / April 26
 
[1062BPY12001] Data analysis with R / April 19
[1062BPY12001] Data analysis with R / April 19[1062BPY12001] Data analysis with R / April 19
[1062BPY12001] Data analysis with R / April 19
 
[1062BPY12001] Data analysis with R / week 4
[1062BPY12001] Data analysis with R / week 4[1062BPY12001] Data analysis with R / week 4
[1062BPY12001] Data analysis with R / week 4
 
[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3
 
[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2
 
Regression 0410
Regression 0410Regression 0410
Regression 0410
 
Statistical computing 03
Statistical computing 03Statistical computing 03
Statistical computing 03
 
Statistical computing 01
Statistical computing 01Statistical computing 01
Statistical computing 01
 
Multiple regression
Multiple regressionMultiple regression
Multiple regression
 
Model III ANOVA & Simple Main Effects
Model III ANOVA & Simple Main EffectsModel III ANOVA & Simple Main Effects
Model III ANOVA & Simple Main Effects
 
Essentials of EEG/MEG
Essentials of EEG/MEGEssentials of EEG/MEG
Essentials of EEG/MEG
 
Kirk' Experimental Design, Chapter 4
Kirk' Experimental Design, Chapter 4Kirk' Experimental Design, Chapter 4
Kirk' Experimental Design, Chapter 4
 
APA style
APA styleAPA style
APA style
 
Kirk' Experimental Design, Chapter 1
Kirk' Experimental Design, Chapter 1Kirk' Experimental Design, Chapter 1
Kirk' Experimental Design, Chapter 1
 
R intro 20140716-basic
R intro 20140716-basicR intro 20140716-basic
R intro 20140716-basic
 
R intro 20140716-advance
R intro 20140716-advanceR intro 20140716-advance
R intro 20140716-advance
 

Statistical computing 00

Notas do Editor

  1. an early, automatic semantic stimulus analysis, which might be related to the high relevance of ‘time reference’ to everyday decision-making and preference formation