<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>讀數一格 &#187; data science</title>
	<atom:link href="https://readata.org/tag/data-science/feed/" rel="self" type="application/rss+xml" />
	<link>https://readata.org</link>
	<description>傾聽數據的聲音</description>
	<lastBuildDate>Wed, 13 May 2020 18:15:32 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>從套件的發展談 R 與 Python</title>
		<link>https://readata.org/r-vs-python/</link>
		<comments>https://readata.org/r-vs-python/#comments</comments>
		<pubDate>Sat, 18 Mar 2017 08:30:44 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Data Science]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://readata.org/?p=410</guid>
		<description><![CDATA[昨天到淡江大學參加大數據分析與 R 論壇，與談的過程中陳景祥...]]></description>
				<content:encoded><![CDATA[<p>昨天到淡江大學參加大數據分析與 R 論壇，與談的過程中陳景祥老師提出了資料分析工具比較的討論議題。本來是想強調智庫驅動徵才要找怎樣的人，一不小心被引導到 R 與 Python 的比較 (後來想來，根本是陳老師在挖坑&#8230;)。網路上其實已經很多人討論過這個題目，譬如這篇《<a href="http://www.bigdatafinance.tw/index.php/tech/methodology/193-r-python" target="_blank">數據科學界華山論劍：R與Python巔峰對決</a>》，整理得非常完整，根本就意圖 closed 這系列的討論。</p>
<p>這邊想補充一個會議上沒來得及說清楚的觀點。從資料分析的功能面上，即便 R 跟 Python 如果做一個比較表，也會發現兩邊不分上下，比不出一個所以然。筆者簡單將資料分析的方法分成四大類：Regression, Classification, Clustering and Dimensionality reduction，在下表中列出幾個代表性的演算法，接著再指出 R 與 Python 的對應資料分析套件。</p>
<p>看完這張表格就會理解 R 與 Python，這兩種語言在資料分析工具發展的思維上是有決定性差異的，筆者認為這個差異將決定使用者解決真實問題的方式。對於 R語言來說，各種演算法散落在各種套件當中，所以 R user 在做資料分析的時候，必須要先思考它所面對的問題需要載入怎樣的套件才能解決，如果這個套件提供的演算法仍不夠完善，R user 會先嘗試對該演算法做校正，而不是去思考要不要換其他套件庫。至於 Python user 在做資料分析時，當他載入 scikit-learn 之後，他有超級豐富的武器庫可以去嘗試，當某個演算法效果不如預期時，Python user 會傾向先換別的演算法再試一次看看。</p>
<div id="attachment_420" style="width: 1588px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2017/03/R_Python_packages.png"><img class="wp-image-420 size-full" src="http://readata.org/wp-content/uploads/2017/03/R_Python_packages.png" alt="R_Python_packages" width="1578" height="1222" /></a><p class="wp-caption-text">從套件功能比較 R 與 Python</p></div>
<p>再次強調，在演算法的功能面以及模型優化上 R 與 Python 其實都可以做。就筆者自身經驗 R users 在討論資料分析遇到瓶頸的時候會先討論 outlier, overfitting, regularization。而 Python users 在討論的時候會先盤點用過哪些演算法，哪些演算法可以解決某某問題。筆者認為這是這兩種工具發展目的所造成的差異， R 語言是隨著學術研究而發展、Python 則是基於優化資料分析的應用環境。</p>
<p>從企業招募的觀點來說，主管應該要思考的是做資料分析的目的為何，需要招募怎樣特質的資料分析師。詢問筆者該學習 R 或 Python 的學生，則建議思考一下你的個人特質適合，想要橫向或縱向的分配你的技能點。</p>
<p>特色圖片取自：<a href="http://www.activestate.com/blog/2016/02/r-vs-python-false-dichotomy" target="_blank">ActiveState</a></p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/r-vs-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用資料科學迎擊選戰</title>
		<link>https://readata.org/taipei-election-analysis/</link>
		<comments>https://readata.org/taipei-election-analysis/#comments</comments>
		<pubDate>Wed, 23 Jul 2014 12:46:09 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Data Science]]></category>
		<category><![CDATA[CART]]></category>
		<category><![CDATA[Data mining]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[poll analysis]]></category>

		<guid isPermaLink="false">http://readata.org/?p=144</guid>
		<description><![CDATA[隨著年底直轄市長/縣市長選舉的逼近，在我看來利用資料學方法規...]]></description>
				<content:encoded><![CDATA[<p>隨著年底直轄市長/縣市長選舉的逼近，在我看來<span style="color: #333399;">利用資料學方法規劃選舉策略</span>是很有潛力的。我以沈富雄先生宣布參選參選台北市長後，TVBS 於6月21日所做的<a href="http://home.tvbs.com.tw/static/FILE_DB/PCH/201406/20140623181600986.pdf" target="_blank">民調數據</a>為基礎，再加上<a href="http://163.29.37.101/pxweb2007-tp/dialog/statfile9.asp" target="_blank">台北市統計資料庫查詢系統</a>，利用<a href="http://en.wikipedia.org/wiki/Gibbs_sampling" target="_blank">Gibbs sampling</a>的概念將民調結果的表2-1至表2-6回推成<del>拿不到的</del>原始民調數據，數據大致如下表所示：</p>
<p>表1：台北市長選情民調數據範例<br />

<table id="tablepress-3" class="tablepress tablepress-id-3">
<thead>
<tr class="row-1 odd">
	<th class="column-1">支持者</th><th class="column-2">性別</th><th class="column-3">年齡</th><th class="column-4">地區</th><th class="column-5">學歷</th><th class="column-6">省籍</th><th class="column-7">政黨傾向</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2 even">
	<td class="column-1">連勝文</td><td class="column-2">女性</td><td class="column-3">30+</td><td class="column-4">中山大同</td><td class="column-5">高中</td><td class="column-6">閩南</td><td class="column-7">中立</td>
</tr>
<tr class="row-3 odd">
	<td class="column-1">柯文哲</td><td class="column-2">男性</td><td class="column-3">50+</td><td class="column-4">士林北投</td><td class="column-5">大專</td><td class="column-6">客家</td><td class="column-7">民進黨</td>
</tr>
<tr class="row-4 even">
	<td class="column-1">柯文哲</td><td class="column-2">男性</td><td class="column-3">60+</td><td class="column-4">士林北投</td><td class="column-5">大專</td><td class="column-6">閩南</td><td class="column-7">中立</td>
</tr>
<tr class="row-5 odd">
	<td class="column-1">柯文哲</td><td class="column-2">女性</td><td class="column-3">30+</td><td class="column-4">松山信義</td><td class="column-5">大專</td><td class="column-6">閩南</td><td class="column-7">民進黨</td>
</tr>
<tr class="row-6 even">
	<td class="column-1">沈富雄</td><td class="column-2">女性</td><td class="column-3">40+</td><td class="column-4">中山大同</td><td class="column-5">高中</td><td class="column-6">外省</td><td class="column-7">中立</td>
</tr>
<tr class="row-7 odd">
	<td class="column-1">未決定</td><td class="column-2">男性</td><td class="column-3">50+</td><td class="column-4">內湖南港</td><td class="column-5">國中</td><td class="column-6">其他</td><td class="column-7">中立</td>
</tr>
</tbody>
</table>
<!-- #tablepress-3 from cache -->
<p>參考日前由 OSSF 在中研院舉辦的 <a href="http://www.openfoundry.org/tw/activities/details/428-Data-Science-with-R-Workshop" target="_blank">Data Science with R Workshop</a> (<a href="http://johnsonhsieh.github.io/DSR_workshop/index.html#42" target="_blank">簡報</a>)，在介紹Data mining 方法時提到的分類與迴歸樹 (<a href="http://www.stat.cmu.edu/~cshalizi/350/lectures/22/lecture-22.pdf" target="_blank">Classiﬁcation and Regression Trees, CART</a>) 進行分析，如下圖所示：</p>
<div id="attachment_177" style="width: 710px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/07/election-tree1.png"><img class="size-large wp-image-177" src="http://readata.org/wp-content/uploads/2014/07/election-tree1-1024x671.png" alt="台北市長選戰決策樹" width="700" height="458" /></a><p class="wp-caption-text">台北市長選戰決策樹</p></div>
<p>自左上而右下觀察這棵決策樹，可以發現影響選民支持度最重要的變數終究是政黨偏好，傾向於國民黨者對於連勝文的支持率為 0.69，傾向民進黨者對柯文哲的支持率則為 0.83。至於自稱中立與傾向其他政黨 (包含台聯、親民黨、新黨、無黨聯盟、綠黨與拒答) 者當中，20-29歲的年輕人有很大的比例的支持柯文哲 (0.66)，30歲以上的人則依據祖籍、性別的不同對於連勝文、柯文哲、沈富雄各有所好。有趣的是30歲以上、祖籍為閩南、客家的選民中，柯文哲顯然更受到男性支持 (0.54)；同樣在30歲以上、祖籍為外省、其他的族群中，連勝文的支持率為34%。至於選民的教育程度、居住地區等訊息屬於相對次要的影響因子(雖然說是次要因子，但仍影響了一成以上的選票)，則能顯示諸如：1. 連、柯的鐵票族群細目；2. 沈富雄從連、柯二人手中轉移的潛在選票族群；以及 3. 未表態選民的特徵等訊息。為了不讓決策樹解釋過於冗長難懂，在此保留那些複雜的細節。</p>
<p>回到我想討論的主軸，資料科學有什麼潛力來幫助選舉策略規劃？根據我日前在政治大學談到<a title="資料科學與媒體報導關聯性分析" href="http://readata.org/portfolio/data-science-and-ecfa/" target="_blank">資料科學與媒體分析</a>的概述：資料科學係指針對特定問題 (在此指某種選舉方針) 規劃資料的收集、萃取、建模、再提供決策的一門學問。再講深入一點，訓練有素的資料科學家能夠針對問題規劃出：1. 該蒐集那些資料、如何蒐集正確的資料； 2. 從幾百筆、幾萬筆、幾千萬筆資料中進行整理、剖析； 3. 透過統計建模從大量的資料中發現洞見，進而提供決策方針。依此定義，資料科學家自然有助於選戰團隊的策略規劃。譬如偵測出各種游移選民的特徵與偏好、鞏固票倉的策略、競選行程路線最佳化&#8230;等等，都能夠讓資料科學家佔有一席之地。</p>
<p>對於資料科學家養成內容感興趣的讀者，請參考中研院資訊科學所陳昇瑋老師的<a href="http://techorange.com/2014/07/16/self-trained-data-scientist/" target="_blank">專訪</a>。此外，如果想進一步接觸資料科學養成課程的同好近期 TW.R 社群展開了一系列免費的資料科學上手課程，詳見<a href="https://www.facebook.com/Tw.R.User" target="_blank">TW.R 臉書頁面</a>以及活動<a href="http://www.meetup.com/Taiwan-R/" target="_blank">meetup</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/taipei-election-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>以統計人的觀點談 Big Data</title>
		<link>https://readata.org/statistician-in-big-data/</link>
		<comments>https://readata.org/statistician-in-big-data/#comments</comments>
		<pubDate>Thu, 03 Jul 2014 06:20:29 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Big data]]></category>
		<category><![CDATA[Data Science]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://readata.org/?p=128</guid>
		<description><![CDATA[六月初偕同御言堂總經理劉嘉凱 (CK) 先生以及 Etu 負...]]></description>
				<content:encoded><![CDATA[<p>六月初偕同御言堂總經理劉嘉凱 (CK) 先生以及 Etu 負責人蔣居裕 (Fred) 代表 Data Science Program (<a href="datasci.co" target="_blank">DSP</a>) 到<a title="資料科學計劃的成果與展望" href="http://readata.org/portfolio/%e8%b3%87%e6%96%99%e7%a7%91%e5%ad%b8%e8%a8%88%e5%8a%83%e7%9a%84%e6%88%90%e6%9e%9c%e8%88%87%e5%b1%95%e6%9c%9b/">交大統計所演講</a>的時候，跟所長黃冠華教授聊到統計所與資訊學院合作開設<a href="http://www.stat.nctu.edu.tw/data/super_pages.php?ID=data1">巨量資料分析學分學程</a>印證了以下想法。</p>
<p>統計是從複雜數據中萃取出有用訊息的學問，在分析巨量資料 (big data) 的過程中，理當扮演舉足輕重的角色。然而，傳統的統計學系訓練學生的方式著重在統計工具的開發與應用上，這並不足以勝任所謂的巨量資料分析。</p>
<p>隨著巨量資料這個議題逐漸火熱，一個新的科學領域：資料科學 (data science) 也隨之而生，相對於統計學專注於分析方法之上，資料科學強調的是以資料解決問題的整體流程，即</p>
<p>1. 在該領域有深厚的專業知識，能夠將欲解決的問題以科學建模來表達。</p>
<p>2. 具備足夠的電腦知識與程式能力，能夠高效率的蒐集、清理、管理巨量資料。</p>
<p>3. 對統計方法有廣泛的瞭解，能夠快速的選用適當的統計方法，甚至是開發新的統計方法來分析資料。</p>
<p>4. 綜合以上三者，能夠以非技術性的語言 (譬如：資料/指標視覺化) 來闡釋分析結果，達成有效率的溝通。</p>
<p>&nbsp;</p>
<div style="width: 437px" class="wp-caption aligncenter"><img src="http://image.slidesharecdn.com/random-140515065048-phpapp02/95/slide-15-638.jpg" alt="" width="427" height="320" /><p class="wp-caption-text">資料科學強調整個流程，統計學則強調分析 (Model) 的部分</p></div>
<p>&nbsp;</p>
<p>就筆者的認知，統計學的本質和現在所謂的資料科學並無不同。然而，從幾乎所有統計教材都會引用的鳶尾花資料集 (<a href="http://en.wikipedia.org/wiki/Iris_flower_data_set" target="_blank">iris data</a>) 當作範例就可以發現，統計人太習慣於從某些領域的提問者中聽取問題、收取已經整理好的資料集 (data frame, 諸如 .txt、.csv 檔)，然後再「開始做統計」。什麼時候開始，統計人自詡只需要紙筆與電腦就可以做研究，卻忘了在統計界備受尊崇的 <a href="http://en.wikipedia.org/wiki/Ronald_Fisher" target="_blank">R. A. Fisher</a> 爵士是在農業試驗所中發展出變異數分析、實驗設計法、最大概似估計&#8230;。</p>
<p>或許對於一個專精於統計方法的統計人而言，這種習慣並無不妥。但是在現今巨量資料的浪潮上，到處充斥著結構化、半結構化與非結構化的資料 (詳見 <a href="http://fredbigdata.blogspot.tw/2012/08/blog-post.html" target="_blank">Fred 豢養的雲中象</a>)。這類資料跟以往統計教科書裡面經由篩選與處理後的資料完全不同。以企業內部的結構化資料為例，當企業負責人抱著 SQL Database 或 Data Warehouse 裡面滿滿的資料來請統計專家做問題諮詢時，該怎麼回應? 如果是非結構化的圖檔、影像檔，統計專家又該怎麼回應? 就像林禎舜師兄在<a href="http://www.meetup.com/Taiwan-R/" target="_blank">MLDM Monday</a>的<a href="https://www.youtube.com/watch?v=NVzkDQNpU7w" target="_blank">演講</a>中提到的一個概念：就現今以資料解決問題的話語權而言，(相對於資訊科學) 統計學的話語權是逐漸式微的 (因為統計人無法處理第一線的資料)。</p>
<p>我的經驗是統計人要拋開傳統教科書對於 data 就是一個data frame 的認知，瞭解 data 的原貌是真實世界的一種記錄方式，它可以是數字、文字、聲音、影像、氣味、建築物&#8230;。真真切切的去貼近真實世界、去貼近第一手資料，用最直覺的方式體會所知的統計方法，就會發現這些方法的精神其實可以應用在各式各樣的資料上。</p>
<p>下一篇，將會具體的談到統計人進入Big data / Data science 的建議。</p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/statistician-in-big-data/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>服貿事件 X 資料科學</title>
		<link>https://readata.org/ecfa-and-data-science/</link>
		<comments>https://readata.org/ecfa-and-data-science/#comments</comments>
		<pubDate>Thu, 27 Mar 2014 08:46:57 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Data Science]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[ecfa]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[text mining]]></category>

		<guid isPermaLink="false">http://readata.org/?p=44</guid>
		<description><![CDATA[近期服貿議題越演越烈，自318學生佔領國會，324 學生攻佔...]]></description>
				<content:encoded><![CDATA[<p>近期服貿議題越演越烈，自318學生佔領國會，324 學生攻佔行政院與強制驅離事件發生後。我以為身為一個統計人，應該用自己的專長來關心這個議題。有鑑於此，我問自己一個問題：<strong>抗議現場的情況與各家媒體報導的真實性為何</strong>？</p>
<p>事實上，討論真實性這種虛無飄渺的概念並不容易，所以我退而求其次考慮比較能夠量化的問題，即<strong>報導之間的關聯性</strong>。</p>
<p><span style="line-height: 1.5;">有了這個想法之後，我蒐集了<a href="http://g0v.today">g0v.today</a>提供的現場文字轉播資料，學生族群常用的<a href="http://www.ptt.cc/bbs/FuMouDiscuss/">PTT服貿版</a>資料，以及幾家新聞的報導資料進行初步分析，</span>3/25號晚上在臉書上發布了以下這張實驗性分析圖，並且徵求夥伴幫忙擷取各家媒體更完整的服貿報導資料。</p>
<div id="fb-root"></div>
<p><script>// <![CDATA[
(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/zh_TW/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
// ]]&gt;</script></p>
<div class="fb-post" data-href="https://www.facebook.com/photo.php?fbid=10201657755867776&amp;set=a.1092542035856.2014576.1295675938&amp;type=1" data-width="466">
<div class="fb-xfbml-parse-ignore">由 <a href="https://www.facebook.com/JJHsieh">Johnson Hsieh</a> <a href="https://www.facebook.com/photo.php?fbid=10201657755867776&amp;set=a.1092542035856.2014576.1295675938&amp;type=1">貼文</a>。</div>
</div>
<dl class="wp-caption aligncenter" style="width: 308px;">
<dt class="wp-caption-dt"></dt>
</dl>
<p>&nbsp;</p>
<p>這兩天，感謝很多人熱心的幫忙。無論是資料的提供、文本挖掘技術的交流還是媒體分析經驗的分享等等 (感謝<a href="http://newsdiff.g0v.ronny.tw/" target="_blank">Ronny</a>, <a href="http://piposay.com" target="_blank">Marsan</a>, 文心, <a href="http://www.insight-post.tw/" target="_blank">Toley</a> and <a href="https://www.facebook.com/numerinfo">家齊</a>)。我用更嚴謹的方法得到了以下關聯性分析結果，</p>
<p><a href="http://readata.org/wp-content/uploads/2014/03/myplot1.png"><img class="aligncenter size-large wp-image-46" src="http://readata.org/wp-content/uploads/2014/03/myplot1-1024x859.png" alt="服貿事件報導關係圖" width="474" height="397" /></a><br />
先說圖怎麼看，曲線的粗細表示報導來源之間的相關性強度。再說我的主要發現：</p>
<ol>
<li><span style="line-height: 1.5;">蘋果日報與所有報導來源都有高度的關聯性</span></li>
<li><span style="line-height: 1.5;">報導來源可以分成左右兩群，右半邊是一般的媒體報導，左半邊則是蘋果日報與民間報導。</span></li>
<li><span style="line-height: 1.5;">儘管PTT與現場文字轉播的關聯性在所有報導來源中是最高的。但是，PTT與各大新聞媒體的關聯性都偏低。</span></li>
</ol>
<p>至於分析方法，簡單來說就是以關鍵字找相似度。我用<a href="http://www.r-project.org/" target="_blank">R</a>當作主要分析工具，參考家齊與嘉葳參與<a href="https://www.facebook.com/Tw.R.User">Taiwan R user group</a>在<a href="http://www.meetup.com/Taiwan-R/events/">MLDM Monday meetup</a>關於文本挖掘的演講 (<a href="https://www.youtube.com/watch?v=TcMao3r6jYY" target="_blank">1</a> &amp; <a href="http://rstudio-pubs-static.s3.amazonaws.com/12422_b2b48bb2da7942acaca5ace45bd8c60c.html" target="_blank">2</a>) 進行文本分析，分析出各家媒體報導的關鍵字詞頻，再利用我做生物統計最熟悉的相似度指標來計算各家報導的關聯性。</p>
<p><span style="line-height: 1.5;">最後，我是打算用作研究的態度來玩這個題目。所以必須談談現在遇到的困難之處，希望有人能給點意見。最主要的困難點在於：「</span><span style="line-height: 1.5;">現場文字播報忠實的呈現現場結果，但相較一般新聞報導而言，有口語化過度的問題」。口語化的問題必然與媒體使用的文字有所不同，這個效應與</span><span style="line-height: 1.5;">媒體選擇性報導的差異混淆在一起。解決的辦法目前想嘗試：<br />
</span></p>
<ol>
<li><span style="line-height: 1.5;">確實移除口語化關鍵字之後，再計算相似度 (部分完成)</span></li>
<li>加入民間媒體進行分析，ex: <a href="https://www.facebook.com/NtuNewsEForum/notes" target="_blank">台大新聞E論壇</a> (周末動工)</li>
</ol>
<p>對於上述分析有問題，或是我的後續研究有所建議者，不吝指教，謝謝。</p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/ecfa-and-data-science/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>統計指標與謊言</title>
		<link>https://readata.org/lie-and-statistics/</link>
		<comments>https://readata.org/lie-and-statistics/#comments</comments>
		<pubDate>Wed, 26 Mar 2014 11:47:30 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Data Science]]></category>
		<category><![CDATA[data science]]></category>

		<guid isPermaLink="false">http://readata.org/?p=26</guid>
		<description><![CDATA[美國著名文豪馬克‧吐溫留下一段經典名句：「謊言有三種：謊言、...]]></description>
				<content:encoded><![CDATA[<p>美國著名文豪馬克‧吐溫留下一段經典名句：「<a href="http://en.wikipedia.org/wiki/Lies,_damned_lies,_and_statistics">謊言有三種：謊言、該死的謊言與統計數字 </a>(There are three kinds of lies: lies, damned lies, and statistics.）。」目的在於諷刺那些使用統計數據支持卻毫無說服力的報告，以及貶低反對立場的統計結論。我想要用一個發生在台灣的真實案例來呼應馬克‧吐溫的哲言。</p>
<p>以下是2012年3月27日自由時報的頭條<a href="http://www.libertytimes.com.tw/2012/new/mar/27/today-t3.htm" target="_blank">新聞</a>，主要是說明2010年度最窮的5%家庭平均年所得僅4.6萬元，對比最富的5%家庭平均年所得429.4萬元，差距達到93倍，比去年的75倍差距來得更高。</p>
<div id="attachment_30" style="width: 712px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/liberty-times.png"><img class="size-full wp-image-30" style="border-style: groove; border-width: 1pt; padding: 20px;" src="http://readata.org/wp-content/uploads/2014/03/liberty-times.png" alt="自由時報-貧富差距飆至93倍 歷史新高 http://www.libertytimes.com.tw/2012/new/mar/27/today-t3.htm" width="702" height="429" /></a><p class="wp-caption-text">自由時報-貧富差距飆至93倍 歷史新高 http://www.libertytimes.com.tw/2012/new/mar/27/today-t3.htm</p></div>
<p>再看一則當時經建會主委尹啟銘先生的<a href="http://www.ndc.gov.tw/m1.aspx?sNo=0016735" target="_blank">文章</a>，時間是在上一則新聞過後的兩天 (3/29) 。主要是在闡述國際上常用的是五等分法，即最窮與最富的20%來比較，得貧富差距為6.19倍，相比去年的6.34倍來得低。至於使用最窮與最富的5%來衡量貧富差距（二十等分法）在國際上缺乏理論的根據和無公信力作基礎，因此國際上幾乎無人採用。</p>
<div id="attachment_29" style="width: 655px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/ndc-gov.png"><img class="size-full wp-image-29" style="border-style: groove; border-width: 1pt; padding: 20px;" src="http://readata.org/wp-content/uploads/2014/03/ndc-gov.png" alt="尹啟銘-讓國人正確了解當前貧富差距, http://www.ndc.gov.tw/m1.aspx?sNo=0016735" width="645" height="385" /></a><p class="wp-caption-text">尹啟銘-讓國人正確了解當前貧富差距, http://www.ndc.gov.tw/m1.aspx?sNo=0016735</p></div>
<p>事實上，這種爭論每年都會登上新聞版面，譬如自由時報2013/06/10的頭版<a href="http://www.libertytimes.com.tw/2013/new/jun/10/today-t2.htm" target="_blank">新聞</a></p>
<div id="attachment_33" style="width: 640px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/liberty-times-2.png"><img class="size-full wp-image-33" style="border-style: groove; border-width: 1pt; padding: 20px;" src="http://readata.org/wp-content/uploads/2014/03/liberty-times-2.png" alt="自由時報-最富5％VS.最窮5％ 所得差距逾96倍 http://www.libertytimes.com.tw/2013/new/jun/10/today-t2.htm" width="630" height="456" /></a><p class="wp-caption-text">自由時報-最富5％VS.最窮5％ 所得差距逾96倍 http://www.libertytimes.com.tw/2013/new/jun/10/today-t2.htm</p></div>
<p>再如TVBS在2014/01/09的影音版<a href="http://news.tvbs.com.tw/entry/517145" target="_blank">新聞</a></p>
<div id="attachment_32" style="width: 730px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/20140109232310256.jpg"><img class="size-full wp-image-32" style="border-style: groove; border-width: 1pt; padding: 20px;" src="http://readata.org/wp-content/uploads/2014/03/20140109232310256.jpg" alt="貧富差距擴大？ 逾9成民眾：嚴重！http://news.tvbs.com.tw/entry/517145" width="720" height="480" /></a><p class="wp-caption-text">貧富差距擴大？ 逾9成民眾：嚴重！http://news.tvbs.com.tw/entry/517145</p></div>
<p><span style="line-height: 1.5;"><br />
平平都是相同來源的每戶年平均所得資料，究竟怎麼一回事？如何從這種裡用統計指標 (statistical index) 各說各話的情勢中明辨是非，是我所關心的問題。</span><span style="line-height: 1.5;">從我整理自上述新聞以及官方公佈的<a href="http://win.dgbas.gov.tw/fies/doc/result/101.pdf" target="_blank">家庭收支調查報告</a>勉強可以看出一點端倪。</span></p>
<p><span style="line-height: 1.5;">
<table id="tablepress-1" class="tablepress tablepress-id-1">
<thead>
<tr class="row-1 odd">
	<th class="column-1">年度(萬元)</th><th class="column-2">94年</th><th class="column-3">95年</th><th class="column-4">96年</th><th class="column-5">97年</th><th class="column-6">98年</th><th class="column-7">99年</th><th class="column-8">100年</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2 even">
	<td class="column-1">最低5%</td><td class="column-2">7.2</td><td class="column-3">6.9</td><td class="column-4">7.2</td><td class="column-5">6.9</td><td class="column-6">5.1</td><td class="column-7">4.6</td><td class="column-8">4.8</td>
</tr>
<tr class="row-3 odd">
	<td class="column-1">最低20%</td><td class="column-2">29.8</td><td class="column-3">30.4</td><td class="column-4">31.2</td><td class="column-5">30.4</td><td class="column-6">28.2</td><td class="column-7">28.9</td><td class="column-8">29.6</td>
</tr>
<tr class="row-4 even">
	<td class="column-1">最高20%</td><td class="column-2">180</td><td class="column-3">183</td><td class="column-4">187</td><td class="column-5">184</td><td class="column-6">179</td><td class="column-7">187</td><td class="column-8">183</td>
</tr>
<tr class="row-5 odd">
	<td class="column-1">最高5%</td><td class="column-2">397</td><td class="column-3">402</td><td class="column-4">435</td><td class="column-5">451</td><td class="column-6">383</td><td class="column-7">432</td><td class="column-8">464</td>
</tr>
</tbody>
</table>
<!-- #tablepress-1 from cache --></span></p>
<p>看得出來嗎？除了2009年 (民國98年) 國際金融危機之外，最低20%與最高20%的家庭收入2005年以來大致上並無太大的改變。但是最低5%在2009年之後明顯的下降，最高5%則有明顯的上升趨勢。</p>
<p>最後，我參考<a href="http://en.wikipedia.org/wiki/Household_income_in_the_United_States" target="_blank">美國每戶收入</a>的<a href="http://en.wikipedia.org/wiki/File:Distribution_of_Annual_Household_Income_in_the_United_States_2012.png" target="_blank">直方圖</a>，再根據二十等分位的統計指標來回推台灣在2005與2011年的每戶年平均收入分布圖。先看下圖的右半部 (富人部分)，可以發現藍色 (2011年) 的圖形的右邊拖著一條比紅色 (2005年) 圖形要高的尾巴；再看左半部 (窮人部分)，雖然有一點不明顯，不過還是可以發現藍色比紅色圖形更靠左邊。與其追究政府官員還是新聞報導的統計指標孰是孰非，我以為透過這張分布圖來回答更加明確。這邊用統計人的角度murmur一下，有關單位不要只公布統計指標，Data Open吧。</p>
<div id="attachment_42" style="width: 510px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/Rplot05.png"><img class="size-full wp-image-42" src="http://readata.org/wp-content/uploads/2014/03/Rplot05.png" alt="台灣每戶年平均收入猜測" width="500" height="400" /></a><p class="wp-caption-text">台灣每戶年平均收入猜測</p></div>
<p>我寫這篇文章的主要目的，不在於討論台灣社會貧富差距 (這類的討論真的很多，光是用幾等分法來衡量貧富差距就吵不完了)，而是在於呼應馬克‧吐溫的哲言。要知道，同樣的資料集可以產生各種不同的統計指標，每一種統計指標都有獨特的意義以及適用的時機。<strong>統計指標並沒有好壞之分，可惡的是因為立場的不同，而使用特定指標來做為宣傳工作的壞蛋</strong>。</p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/lie-and-statistics/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>資料科學之我見</title>
		<link>https://readata.org/about-data-science/</link>
		<comments>https://readata.org/about-data-science/#comments</comments>
		<pubDate>Wed, 19 Mar 2014 15:58:10 +0000</pubDate>
		<dc:creator><![CDATA[Johnson]]></dc:creator>
				<category><![CDATA[Data Science]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[dsp]]></category>

		<guid isPermaLink="false">http://readata.org/?p=4</guid>
		<description><![CDATA[任何時代都有資料科學的問題，最早的資料科學可以追溯到統治者在...]]></description>
				<content:encoded><![CDATA[<p class="size-large wp-image-18">任何時代都有資料科學的問題，最早的資料科學可以追溯到統治者在處理軍役戶政以及農業畜牧的問題上，經典的例子就是<a href="http://zh.wikipedia.org/wiki/%E4%BA%BA%E5%8F%A3%E6%99%AE%E6%9F%A5">人口調查</a>與<a href="http://www3.stat.sinica.edu.tw/camp2012/download/%E5%91%82%E6%A4%BF%E6%A3%A0.pdf">農產品改良試驗</a>。 接著數據分析被應用到工業界中，譬如提高產能與改善良率的統計方法。同時，經濟學、社會學、生命科學…也開始透過統計方法來描述現象、驗證假說。近來計算 機科學發展成熟，資料儲存的成本降低，從大數據中萃取有用資訊的演算技術逐漸受到重視，這種從大數據中尋找挖掘可供決策的規則就是所謂的資料探勘 (Data mining)。事實上，從古到今資料科學的本質並沒有不同，改變的只是因應人類活動型態的轉變，使得數據的收集方式及其分析方法跟著轉變罷了。現在Big Data很熱門，卻也陷入Big的迷思，忘了資料科學的本質其實是在Data上。</p>
<p class="size-large wp-image-18">談到Data，必須先說明資料如何收集。一般來說可以分成top- down與bottom-up兩種。所謂的top-down係指企業主在資料收集前，有既定的問題想要解答，譬如某樂利杯咖啡的企業想要訂定飲品的優惠行 銷策略，這時候必須透過收集各個分店每種飲品在各種時間與季節的銷售數據，甚至是特殊優惠活動時飲品的銷售記錄等等資料，進行數據分析以回答問題。另一種 bottom-up是從既有資料中尋找規則，譬如從前述飲品的銷售數據中，歸納出那些飲品組合最受到消費者喜愛，讓企業達到飲品事先推薦、飲品銷售預測等 等目的。當然，資料的收集並不侷限是top-down或是bottom-up，而是兩者上上下下的循環，藉由不斷的調整為企業創造最大的利益。以上例子， 可以被應用在一間小店上，也可以用在全台展店數百家的企業上，甚至可以用在全球五大洲擁有數千間連鎖分店的企業之上。對於資料科學而言，無論資料規模的大 小，透過Data來解決問題的本質是始終不變的。差別僅在於時代的進步，資料收集的方式比以往方便也更加多元。當然相對於可以在中小規模的數據上使用的統 計方法，套到大數據時會有運算效率不彰的問題，但我認為這是技術上的問題，並不影響基本的統計思維。</p>
<div id="attachment_18" style="width: 410px" class="wp-caption aligncenter"><a href="http://readata.org/wp-content/uploads/2014/03/data-science-word-could1-e1395249635756.png"><img class="size-full wp-image-18" src="http://readata.org/wp-content/uploads/2014/03/data-science-word-could1-e1395249635756.png" alt="data-science-word-could" width="400" height="340" /></a><p class="wp-caption-text">data science word cloud, made by Marina Yuan</p></div>
<p>把問題收斂，如果企業主想要利用Data來 (無論是Big Data, Middle Data 還是 Small Data) 提升企業的營運，該怎麼做？第一步多半是想找一位精通資料科學的專業人才吧。但是當他們想要這麼做時，卻發現找不到這種人才。真的是這樣嗎？</p>
<p>我以為資料科學基本的流程是這樣子的：</p>
<ol>
<li>列出企業想要透過Data解決的問題</li>
<li>記錄所有可能有助於找出答案的Data</li>
<li>從Data中萃取出規則以回答問題</li>
</ol>
<p>每段流程都是獨門的學問，能夠同時精通三者的人才真的是少之又少，能夠識別這種人才的企業更是寥寥無幾。何不從上述三段流程各別尋找對應的人才呢？ 企業主需要的可能是一位資料科學專家，也可以是一個實力堅強的資料科學團隊。從具有實務經驗的人才庫中尋找第一階段的人選；從具有資料倉儲經驗的人才庫中 尋找第二階段的人選；再從具備資料分析能力的人才庫中尋找第三階段的人選。而我所參與的 <a href="http://datasci.co/">Data Science Program (DSP)</a> 課程設計的目標，除了各自培養三個階段的人才之外，同時也注重這三種人才的交流與整合。 其中<a href="http://datasci.co/2014/02/11/dsp-201403/">DSP團訓班</a>課 程設計的目的就是把這三種人才放在一個團隊裡面，透過各種資料科學面向的課程以及team project的實戰方式，整合出一個完整的資料科學團隊。再補充兩個概念。第一，上述三段流程並不完全是由上至下來執行，而是需要團隊成員彼此不斷的交 流與溝通才能成就出良好的分析結果。第二，已經具備上述三種之中任一種職能的人，透過團訓的過程培養第二、第三種職能並不困難。</p>
<p>總之，我想要強調的有兩點：1. 現階段的資料科學正處於Big Data的浪潮上，Big的確是當前資料的主要特徵，但是核心主角仍然落在Data上，透過數據的深度分析，將數據轉化成可供企業決策的資訊與知識，才是 資料科學中心思想。2. 資料科學這門領域既深且廣，能完全精通此道者無疑是萬中選一的逸才。不過，若能透過資料科學團隊的合作方式，也不失為一種降低資料科學門檻的方法。</p>
]]></content:encoded>
			<wfw:commentRss>https://readata.org/about-data-science/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
