<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>我爱自然语言处理</title>
	
	<link>http://www.52nlp.cn</link>
	<description>I Love Natural Language Processing</description>
	<lastBuildDate>Sun, 20 May 2012 03:29:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/52nlp" /><feedburner:info uri="52nlp" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>52nlp</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/WAIHbreRJyk/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f</link>
		<comments>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f#comments</comments>
		<pubDate>Sun, 20 May 2012 03:23:57 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[机器学习]]></category>
		<category><![CDATA[52Opencourse]]></category>
		<category><![CDATA[Andrew Ng]]></category>
		<category><![CDATA[Cousera]]></category>
		<category><![CDATA[公开课]]></category>
		<category><![CDATA[多变量线性回归]]></category>
		<category><![CDATA[多项式回归]]></category>
		<category><![CDATA[我爱公开课]]></category>
		<category><![CDATA[斯坦福大学]]></category>
		<category><![CDATA[梯度下降]]></category>
		<category><![CDATA[梯度下降算法]]></category>
		<category><![CDATA[正规方程]]></category>
		<category><![CDATA[线性回归]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4525</guid>
		<description><![CDATA[斯坦福大学机器学习第四课"多变量线性回归“学习笔记，本次课程主要包括7部分： 1) Multiple features(多维特征) 2) Gradient descent for multiple variables(梯度下降在多变量线性回归中的应用) 3) Gradient descent in practice I: Feature Scaling(梯度下降实践1：特征归一化) 4) Gradient descent in practice II: Learning rate(梯度下降实践2：步长的选择) 5) Features and polynomial regression(特征及多项式回归) 6) Normal equation(正规方程-区别于迭代方法的直接解法) 7) Normal equation and non-invertibility (optional)(正规方程在矩阵不可逆情况下的解决方法) &#8230; <a href="http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-2' rel='bookmark' title='HMM学习最佳范例五：前向算法2'>HMM学习最佳范例五：前向算法2</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-3' rel='bookmark' title='HMM学习最佳范例五：前向算法3'>HMM学习最佳范例五：前向算法3</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/wordpress-equation-editor-plugin' rel='bookmark' title='WordPress中的公式编辑器插件'>WordPress中的公式编辑器插件</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/%e7%ab%8b%e5%a7%94%e9%9a%8f%e7%ac%94-%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e5%92%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='立委随笔：机器学习和自然语言处理'>立委随笔：机器学习和自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-4' rel='bookmark' title='HMM学习最佳范例五：前向算法4'>HMM学习最佳范例五：前向算法4</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-six-viterbi-algorithm-4' rel='bookmark' title='HMM学习最佳范例六：维特比算法4'>HMM学习最佳范例六：维特比算法4</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>斯坦福大学机器学习第四课"多变量线性回归“学习笔记，本次课程主要包括7部分：</p>
<p>1) Multiple features(多维特征)</p>
<p>2) Gradient descent for multiple variables(梯度下降在多变量线性回归中的应用)</p>
<p>3) Gradient descent in practice I: Feature Scaling(梯度下降实践1：特征归一化)</p>
<p>4) Gradient descent in practice II: Learning rate(梯度下降实践2：步长的选择)</p>
<p>5) Features and polynomial regression(特征及多项式回归)</p>
<p>6) Normal equation(正规方程-区别于迭代方法的直接解法)</p>
<p>7) Normal equation and non-invertibility (optional)(正规方程在矩阵不可逆情况下的解决方法)</p>
<p>以下是每一部分的详细解读：<span id="more-4525"></span></p>
<p><strong>1) Multiple features(多维特征)</strong></p>
<p><a href="http://52opencourse.com/83/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%BA%8C%E8%AF%BE-%E5%8D%95%E5%8F%98%E9%87%8F%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92-linear-regression-with-one-variable" rel="nofollow" data-cke-saved-href="http://52opencourse.com/83/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%BA%8C%E8%AF%BE-%E5%8D%95%E5%8F%98%E9%87%8F%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92-linear-regression-with-one-variable">第二课</a>中我们谈到的是单变量的情况，单个特征的训练样本，单个特征的表达式，总结起来如下图所示：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=10752949732409641430" alt="单变量线性回归示例-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=10752949732409641430" /></p>
<p>对于多维特征或多个变量而言：以房价预测为例，特征除了“房屋大小外”，还可以增加“房间数、楼层数、房龄”等特征，如下所示：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=14532866132628589062" alt="多维特征房价预测问题-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=14532866132628589062" /></p>
<p>定义：</p>
<p>n = 特征数目</p>
<p><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_e8fa5b806940d1b4d0059fba40646506.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x^{(i)}" /></span><script type='math/tex'>x^{(i)}</script>= 第i个训练样本的所有输入特征，可以认为是一组特征向量</p>
<p><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_80577c460c5be9dad0efa86504fb25a1.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_j^{(i)}" /></span><script type='math/tex'>x_j^{(i)}</script> = 第i个训练样本第j个特征的值，可以认为是特征向量中的第j个值</p>
<p>对于Hypothesis，不再是单个变量线性回归时的公式：<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_8aff0535e933201885dbbf8360b64b88.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x)=\theta_0 + \theta_1 x" /></span><script type='math/tex'>h_\theta(x)=\theta_0 + \theta_1 x</script></p>
<p>而是：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_f2252c3fef1fe64bff35ee99750d1dfb.gif' style='vertical-align: middle; border: none;' class='tex' alt="h_\theta(x)=\theta_0 + \theta_1 x_1 + \theta_2 x_2 + ... + \theta_n x_n" /></span><script type='math/tex;  mode=display'>h_\theta(x)=\theta_0 + \theta_1 x_1 + \theta_2 x_2 + ... + \theta_n x_n</script></p></p>
<p>为了方便，记<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_3e0d691f3a530e6c7e079636f20c111b.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x_0" /></span><script type='math/tex'>x_0</script> = 1，则多变量线性回归可以记为：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_f5cf7bdbbb3b214bb40e535a2a488bd5.gif' style='vertical-align: middle; border: none;' class='tex' alt="h_\theta(x)=\theta^Tx" /></span><script type='math/tex;  mode=display'>h_\theta(x)=\theta^Tx</script></p></p>
<p>其中<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script>和x都是向量。</p>
<p>&nbsp;</p>
<p><strong>2) Gradient descent for multiple variables(梯度下降在多变量线性回归中的应用)</strong></p>
<p>对于Hypothesis:</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_9a41442a861715e9a68d9150713b786e.gif' style='vertical-align: middle; border: none;' class='tex' alt="h_\theta(x)=\theta^Tx=\theta_0 + \theta_1 x_1 + \theta_2 x_2 + ... + \theta_n x_n" /></span><script type='math/tex;  mode=display'>h_\theta(x)=\theta^Tx=\theta_0 + \theta_1 x_1 + \theta_2 x_2 + ... + \theta_n x_n</script></p></p>
<p>其中参数：<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_dbc9011a370bca098d4752346ba71d5c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0" /></span><script type='math/tex'>\theta_0</script>, <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7672d625e9a2492987c50d3b87c04349.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1" /></span><script type='math/tex'>\theta_1</script>,...,<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_a3026e320c132de94f7c8ebb952bda60.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_n" /></span><script type='math/tex'>\theta_n</script>可表示为n+1维的向量  <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script></p>
<p>对于Cost Function:</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_5978c711f2a70f3d90f2cfa18e756bfa.gif' style='vertical-align: middle; border: none;' class='tex' alt="J(\theta) = J(\theta_0, \theta_1, ... ,\theta_n) = \frac{1}{2m}\sum_{i=1}^m{(h_\theta(x^{(i)}) - y^{(i)})^2}" /></span><script type='math/tex;  mode=display'>J(\theta) = J(\theta_0, \theta_1, ... ,\theta_n) = \frac{1}{2m}\sum_{i=1}^m{(h_\theta(x^{(i)}) - y^{(i)})^2}</script></p></p>
<p>梯度下降算法如下:</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=2697381742799288283" alt="多变量线性回归梯度下降算法-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=2697381742799288283" /></p>
<p>对<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_698e62e708a07405c6154a447463ef91.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta)" /></span><script type='math/tex'>J(\theta)</script>求导，分别对应的单变量和多变量梯度下降算法如下：</p>
<p>当特征数目为1，也就是n=1时：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4667956549592920672" alt="单变量线性回归梯度下降-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4667956549592920672" /></p>
<p>当特征数目大于1也就是n&gt;1时，梯度下降算法如下：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=14797356136274816539" alt="多变量线性回归梯度下降-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=14797356136274816539" /></p>
<p>&nbsp;</p>
<p><strong>3) Gradient descent in practice I: Feature Scaling(梯度下降实践1：特征归一化)</strong></p>
<p>核心思想：确保特征在相似的尺度里。</p>
<p>例如房价问题：</p>
<p>特征1：房屋的大小（0-2000）；</p>
<p>特征2：房间数目（1-5）；</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6080648855325791452" alt="特征归一化之一-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6080648855325791452" /></p>
<p>简单的归一化，除以每组特征的最大值，则：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3552953195757345727" alt="特征归一化之二-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3552953195757345727" /></p>
<p>&nbsp;</p>
<p>目标：使每一个特征值都近似的落在<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_39469b85637006ce9341d9cf33ddb69a.gif' style='vertical-align: middle; border: none; ' class='tex' alt="-1\leq x_i \leq 1" /></span><script type='math/tex'>-1\leq x_i \leq 1</script>的范围内。</p>
<p>举例：因为是近似落在这个范围内，所以只要接近的范围基本上都可以接受，例如：</p>
<p>0&lt;=x1&lt;=3, -2&lt;=x2&lt;=0.5, -3 to 3, -1/3 to 1/3 都ok;</p>
<p>但是：-100 to 100, -0.0001 to 0.0001不Ok。</p>
<p><strong>Mean Normalization(均值归一化):</strong></p>
<p>用<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_e43015d8bd0c8fccc4fa28da12d9a656.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_i - \mu_i" /></span><script type='math/tex'>x_i - \mu_i</script>替换<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_1ba8aaab47179b3d3e24b0ccea9f4e30.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_i" /></span><script type='math/tex'>x_i</script>使特征的均值近似为0（但是不对<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_57f11b0f54516945ebedf3fbb9aa929e.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_0=1" /></span><script type='math/tex'>x_0=1</script>处理），均值归一化的公式是：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_96b63cc047e30521e09ef323770cb66a.gif' style='vertical-align: middle; border: none;' class='tex' alt="x_i \leftarrow \frac{x_i - \mu_i} {S_i}" /></span><script type='math/tex;  mode=display'>x_i \leftarrow \frac{x_i - \mu_i} {S_i}</script></p></p>
<p>其中<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_804f14414dab2297b600211a82c39fa8.gif' style='vertical-align: middle; border: none; ' class='tex' alt="S_i" /></span><script type='math/tex'>S_i</script>可以是特征的取值范围（最大值-最小值），也可以是标准差(standard deviation).</p>
<p>对于房价问题中的两个特征，均值归一化的过程如下：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=13842488077537337246" alt="均值归一化-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=13842488077537337246" /></p>
<p>&nbsp;</p>
<p><strong>4) Gradient descent in practice II: Learning rate(梯度下降实践2：步长的选择)</strong></p>
<p>对于梯度下降算法：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3750443645098817342" alt="梯度下降算法-learning rate-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3750443645098817342" /></p>
<p>需要注意两点：</p>
<p>-"调试”：如何确保梯度下降算法正确的执行；</p>
<p>-如何选择正确的步长(learning rate):  <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>;</p>
<p>第二点很重要，它也是确保梯度下降收敛的关键点。要确保梯度下降算法正确运行，需要保证 <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_698e62e708a07405c6154a447463ef91.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta)" /></span><script type='math/tex'>J(\theta)</script>在每一步迭代中都减小，如果某一步减少的值少于某个很小的值 <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_92e4da341fe8f4cd46192f21b6ff3aa7.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\epsilon" /></span><script type='math/tex'>\epsilon</script> , 则其收敛。例如：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4513785802723348563" alt="J_tetha_梯度下降收敛例子-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4513785802723348563" /></p>
<p>如果梯度下降算法不能正常运行，考虑使用更小的步长<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>，这里需要注意两点：</p>
<p>1）对于足够小的<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>,  <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_698e62e708a07405c6154a447463ef91.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta)" /></span><script type='math/tex'>J(\theta)</script>能保证在每一步都减小；</p>
<p>2）但是如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>太小，梯度下降算法收敛的会很慢；</p>
<p>总结：</p>
<p>1）如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>太小，就会收敛很慢；</p>
<p>2）如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>太大，就不能保证每一次迭代<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_698e62e708a07405c6154a447463ef91.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta)" /></span><script type='math/tex'>J(\theta)</script>都减小，也就不能保证<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_698e62e708a07405c6154a447463ef91.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta)" /></span><script type='math/tex'>J(\theta)</script>收敛；</p>
<p>如何选择<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>-经验的方法：</p>
<p>..., 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1...</p>
<p>约3倍于前一个数。</p>
<p><strong>5) Features and polynomial regression(特征及多项式回归)</strong></p>
<p>例子-房价预测问题：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7178375898244334911" alt="房价预测问题-多项式回归-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7178375898244334911" /></p>
<p>特征<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_aa687da0086c1ea060a8838e24611319.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x_1" /></span><script type='math/tex'>x_1</script>表示frontage(正面的宽度），特征<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_8732099f74d777a67257cb2f04ead3d8.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x_2" /></span><script type='math/tex'>x_2</script>表示depth(深度)</p>
<p>同时<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_cf0de54527fb9fe9038126d0dc576d5a.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x_1, x_2" /></span><script type='math/tex'>x_1, x_2</script>也可以用一个特征表示：面积 Area = frontage * depth</p>
<p>即 <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_48c56e0a5f6b17715bb0ed86f39be252.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x) = \theta_0 + \theta_1x" /></span><script type='math/tex'>h_\theta(x) = \theta_0 + \theta_1x</script> , x表示面积。</p>
<p><strong>多项式回归:</strong></p>
<p>很多时候，线性回归不能很好的拟合给定的样本点，例如：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=911610636408064885" alt="" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=911610636408064885" /></p>
<p>所以我们选择多项式回归：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3068658801123193145" alt="多项式回归公式-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3068658801123193145" /></p>
<p>对于特征的选择，除了n次方外，也可以开根号，事实上也是1/2次方：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6631273407614129039" alt="多项式回归特征选择-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6631273407614129039" /></p>
<p><strong>6) Normal equation(正规方程-区别于迭代方法的直接解法)</strong></p>
<p>相对于梯度下降方法，Normal Equation是用分析的方法直接解决<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script>.</p>
<p>正规方程的背景：</p>
<p>在微积分里，对于1维的情况，如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script> 属于R:</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_11bce4004601f683c4fc8e2f6fb99f4a.gif' style='vertical-align: middle; border: none;' class='tex' alt="J(\theta) = a\theta^2 + b\theta + c" /></span><script type='math/tex;  mode=display'>J(\theta) = a\theta^2 + b\theta + c</script></p></p>
<p>求其最小值的方法是令：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d85576b67f9f43ac1689783d111672bc.gif' style='vertical-align: middle; border: none;' class='tex' alt="\frac{d}{d\theta}J(\theta) = ...=0" /></span><script type='math/tex;  mode=display'>\frac{d}{d\theta}J(\theta) = ...=0</script></p></p>
<p>然后得到<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script>.</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5358884467053475133" alt="微积分求导-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5358884467053475133" /></p>
<p>&nbsp;</p>
<p>同理，在多变量线性回归中，对于<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_e96779817bed247d08f52c527877cc1c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta \in R^{n+1}" /></span><script type='math/tex'>\theta \in R^{n+1}</script>，Cost Function是：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6110310736829486249" alt="cost function-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6110310736829486249" /></p>
<p>求取<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_2554a2bb846cffd697389e5dc8912759.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta" /></span><script type='math/tex'>\theta</script>的思路仍然是：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=15879228446089531536" alt="求导-cost function-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=15879228446089531536" /></p>
<p>对于有4组特征(m=4)的房价预测问题：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=13686817329013927315" alt="房价预测问题-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=13686817329013927315" /></p>
<p>其中X 是m * (n+1)矩阵：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=10192551476322867713" alt="X-特征矩阵-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=10192551476322867713" /></p>
<p>y是m维向量：<br />
<img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3391957727547829744" alt="y_向量-我爱公开课-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=3391957727547829744" /></p>
<p>则Normal equation的公式为：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d1cb4cfc486df739a3d5c3dd4b336b3a.gif' style='vertical-align: middle; border: none;' class='tex' alt="\theta = (X^T X)^{-1}X^T y" /></span><script type='math/tex;  mode=display'>\theta = (X^T X)^{-1}X^T y</script></p></p>
<p>注：这里直接给出了正规方程的公式，没有给出为什么是这样的，如果想知道原因，建议看看<a href="http://52opencourse.com/98/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%9A%84%E5%AD%A6%E4%B9%A0%E5%8F%8A%E7%9B%B8%E5%85%B3%E8%B5%84%E6%BA%90" rel="nofollow" data-cke-saved-href="http://52opencourse.com/98/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%9A%84%E5%AD%A6%E4%B9%A0%E5%8F%8A%E7%9B%B8%E5%85%B3%E8%B5%84%E6%BA%90">MIT线性代数</a> 第4章4.3节“最小二乘法”的相关内容，这里面最关键的一个点是：</p>
<p>“The partial derivatives of <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_e94782d65b9cb0867495192601b51b98.gif' style='vertical-align: middle; border: none; ' class='tex' alt="||Ax - b||^2 " /></span><script type='math/tex'>||Ax - b||^2 </script> are zero when <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_b6f5739c08ef2d4e93fe5b7aba2e76af.gif' style='vertical-align: middle; border: none; ' class='tex' alt="A^TA x = A^Tb" /></span><script type='math/tex'>A^TA x = A^Tb</script>.</p>
<p>&nbsp;</p>
<p>举例可见官方的PPT，此处略；</p>
<p>Octave公式非常简洁：pinv(X' * X) * X' * y</p>
<p>对于m个样本，n个特征的问题，以下是梯度下降和正规方程的优缺点：</p>
<p><strong>梯度下降：</strong></p>
<p>需要选择合适的learning rate <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>;</p>
<p>需要很多轮迭代；</p>
<p>但是即使n很大的时候效果也很好；</p>
<p><strong>Normal Equation:</strong></p>
<p>不需要选择<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>；</p>
<p>不需要迭代，一次搞定；</p>
<p>但是需要计算<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_451820716182f6864f3fd67bd05944b0.gif' style='vertical-align: middle; border: none; ' class='tex' alt="(X^TX)^{-1}" /></span><script type='math/tex'>(X^TX)^{-1}</script>，其时间复杂度是<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_4a7d22b39e93fbbcbe107e7a19e8bd34.gif' style='vertical-align: middle; border: none; ' class='tex' alt="O(n^3)" /></span><script type='math/tex'>O(n^3)</script></p>
<p>如果n很大，就非常慢</p>
<p>&nbsp;</p>
<p><strong>7) Normal equation and non-invertibility (optional)(正规方程在矩阵不可逆情况下的解决方法)</strong></p>
<p>对于Normal Equation，如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_169ca389ed346f151e81acc018d8e270.gif' style='vertical-align: middle; border: none; ' class='tex' alt="X^TX" /></span><script type='math/tex'>X^TX</script> 不可逆怎么办？</p>
<p>1) 去掉冗余的特征（线性相关）：</p>
<p>例如以平方英尺为单位的面积x1,  和以平方米为单位的面积x2，其是线性相关的：</p>
<p><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_11f4245a7abb8ef3e231d275e4197b4d.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_1=(3.28)^2 x_2" /></span><script type='math/tex'>x_1=(3.28)^2 x_2</script></p>
<p>2) 过多的特征，例如m &lt;= n:</p>
<p>删掉一些特征，或者使用regularization--之后的课程会专门介绍。</p>
<p>&nbsp;</p>
<p><strong>参考资料：</strong></p>
<div>以下是第四课“多变量线性回归”的课件资料下载链接，视频可以在Coursera机器学习课程上观看或下载： <a href="https://class.coursera.org/ml" rel="nofollow" data-cke-saved-href="https://class.coursera.org/ml">https://class.coursera.org/ml</a></div>
<div><a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture4.pptx" rel="nofollow" target="_blank" data-cke-saved-href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture4.pptx">PPT</a>   <a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture4.pdf" rel="nofollow" target="_blank" data-cke-saved-href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture4.pdf">PDF</a></div>
<div></div>
<div>另外关于第三课“线性代数回顾”，由于课程内容相对简单，没有以笔记的形式呈现，而是换了一种写法，具体可参考: <a href="http://52opencourse.com/98/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%9A%84%E5%AD%A6%E4%B9%A0%E5%8F%8A%E7%9B%B8%E5%85%B3%E8%B5%84%E6%BA%90" rel="nofollow" data-cke-saved-href="http://52opencourse.com/98/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%9A%84%E5%AD%A6%E4%B9%A0%E5%8F%8A%E7%9B%B8%E5%85%B3%E8%B5%84%E6%BA%90"> 线性代数的学习及相关资源</a></div>
<div></div>
<div>不过大家仍可从以下链接下载官方第三课的相关课件：</div>
<div>
<div><a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture3.pptx" rel="nofollow" target="_blank" data-cke-saved-href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture3.pptx">PPT</a>   <a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture3.pdf" rel="nofollow" target="_blank" data-cke-saved-href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture3.pdf">PDF</a></div>
</div>
<div></div>
<div>如转载<a href="http://52opencourse.com/" rel="nofollow" target="_blank" data-cke-saved-href="http://52opencourse.com">52opencourse</a>上的任何原创文章，请务必注明出处，谢谢！</div>
<div>原文链接： <a href="http://52opencourse.com/108/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E5%9B%9B%E8%AF%BE-%E5%A4%9A%E5%8F%98%E9%87%8F%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92-linear-regression-with-multiple-variables">Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</a></div>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-2' rel='bookmark' title='HMM学习最佳范例五：前向算法2'>HMM学习最佳范例五：前向算法2</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-3' rel='bookmark' title='HMM学习最佳范例五：前向算法3'>HMM学习最佳范例五：前向算法3</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/wordpress-equation-editor-plugin' rel='bookmark' title='WordPress中的公式编辑器插件'>WordPress中的公式编辑器插件</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/%e7%ab%8b%e5%a7%94%e9%9a%8f%e7%ac%94-%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e5%92%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='立委随笔：机器学习和自然语言处理'>立委随笔：机器学习和自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-five-forward-algorithm-4' rel='bookmark' title='HMM学习最佳范例五：前向算法4'>HMM学习最佳范例五：前向算法4</a></li>
<li><a href='http://www.52nlp.cn/hmm-learn-best-practices-six-viterbi-algorithm-4' rel='bookmark' title='HMM学习最佳范例六：维特比算法4'>HMM学习最佳范例六：维特比算法4</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/WAIHbreRJyk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f</feedburner:origLink></item>
		<item>
		<title>用了两个新插件: MathJax和多说评论</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/B3c-APN6D70/%e7%94%a8%e4%ba%86%e4%b8%a4%e4%b8%aa%e6%96%b0%e6%8f%92%e4%bb%b6-mathjax%e5%92%8c%e5%a4%9a%e8%af%b4%e8%af%84%e8%ae%ba</link>
		<comments>http://www.52nlp.cn/%e7%94%a8%e4%ba%86%e4%b8%a4%e4%b8%aa%e6%96%b0%e6%8f%92%e4%bb%b6-mathjax%e5%92%8c%e5%a4%9a%e8%af%b4%e8%af%84%e8%ae%ba#comments</comments>
		<pubDate>Sat, 12 May 2012 15:31:41 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[MathJax]]></category>
		<category><![CDATA[多说]]></category>
		<category><![CDATA[数学公式]]></category>
		<category><![CDATA[社交化评论]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4501</guid>
		<description><![CDATA[因为需要在“我爱公开课”插入数学公式的缘故，所以用上了MathJax；因为MathJax实在太酷了，所以考虑能在52nlp的wordpress博客上用上，于是Google了一把，发现国内的一个牛人已经贡献了这样的一个插件，具体信息和使用方法可见：在博客上写数学公式的插件LaTex for WordPress。这个插件早期用得是传统的将Latex转换为图片然后进行缓存的方式，目前也将MathJax集成，是我见过的Wordpress上最强到的数学公式插件，强烈推荐使用Wordpress博客的同学使用。具体在使用时，可直接在标题、文章内容和留言中使用LaTex代码输入公式，非常方便。 使用“多说”则是为了尝试一下社交化的评论系统，而这篇文章的目的也是想测试一下多说提供的一些功能，譬如自动同步到微博等等，另外读者如果使用中发现存在某些问题，也请告知，非常感谢！ 相关文章: Google's Python Class - SOS 代友转发：发起成立中文机器翻译定期学术沙龙 Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)” Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)” 52NLP微博-当真李逵遇到假李逵
相关文章:<ol>
<li><a href='http://www.52nlp.cn/googles-python-class-sos' rel='bookmark' title='Google&#039;s Python Class - SOS'>Google's Python Class - SOS</a></li>
<li><a href='http://www.52nlp.cn/%e4%bb%a3%e5%8f%8b%e8%bd%ac%e5%8f%91-%e5%8f%91%e8%b5%b7%e6%88%90%e7%ab%8b%e4%b8%ad%e6%96%87%e6%9c%ba%e5%99%a8%e7%bf%bb%e8%af%91%e5%ae%9a%e6%9c%9f%e5%ad%a6%e6%9c%af%e6%b2%99%e9%be%99' rel='bookmark' title='代友转发：发起成立中文机器翻译定期学术沙龙'>代友转发：发起成立中文机器翻译定期学术沙龙</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/52nlp%e5%be%ae%e5%8d%9a-%e5%bd%93%e7%9c%9f%e6%9d%8e%e9%80%b5%e9%81%87%e5%88%b0%e5%81%87%e6%9d%8e%e9%80%b5' rel='bookmark' title='52NLP微博-当真李逵遇到假李逵'>52NLP微博-当真李逵遇到假李逵</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>因为需要在“<a href="http://52opencourse.com/">我爱公开课</a>”插入数学公式的缘故，所以用上了<a href="http://www.mathjax.org/">MathJax</a>；因为<a href="http://52opencourse.com/63/%E6%88%91%E7%88%B1%E5%85%AC%E5%BC%80%E8%AF%BE-%E6%94%AF%E6%8C%81%E5%9F%BA%E4%BA%8Elatex%E5%BD%A2%E5%BC%8F%E7%9A%84%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F">MathJax</a>实在太酷了，所以考虑能在52nlp的wordpress博客上用上，于是Google了一把，发现国内的一个牛人已经贡献了这样的一个插件，具体信息和使用方法可见：<a href="在博客上写数学公式的插件LaTex for WordPress">在博客上写数学公式的插件LaTex for WordPress</a>。这个插件早期用得是传统的将Latex转换为图片然后进行缓存的方式，目前也将MathJax集成，是我见过的Wordpress上最强到的数学公式插件，强烈推荐使用Wordpress博客的同学使用。具体在使用时，可直接在标题、文章内容和留言中使用LaTex代码输入公式，非常方便。</p>
<p>使用“<a href="duoshuo.com">多说</a>”则是为了尝试一下社交化的评论系统，而这篇文章的目的也是想测试一下多说提供的一些功能，譬如自动同步到微博等等，另外读者如果使用中发现存在某些问题，也请告知，非常感谢！</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/googles-python-class-sos' rel='bookmark' title='Google&#039;s Python Class - SOS'>Google's Python Class - SOS</a></li>
<li><a href='http://www.52nlp.cn/%e4%bb%a3%e5%8f%8b%e8%bd%ac%e5%8f%91-%e5%8f%91%e8%b5%b7%e6%88%90%e7%ab%8b%e4%b8%ad%e6%96%87%e6%9c%ba%e5%99%a8%e7%bf%bb%e8%af%91%e5%ae%9a%e6%9c%9f%e5%ad%a6%e6%9c%af%e6%b2%99%e9%be%99' rel='bookmark' title='代友转发：发起成立中文机器翻译定期学术沙龙'>代友转发：发起成立中文机器翻译定期学术沙龙</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/52nlp%e5%be%ae%e5%8d%9a-%e5%bd%93%e7%9c%9f%e6%9d%8e%e9%80%b5%e9%81%87%e5%88%b0%e5%81%87%e6%9d%8e%e9%80%b5' rel='bookmark' title='52NLP微博-当真李逵遇到假李逵'>52NLP微博-当真李逵遇到假李逵</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/B3c-APN6D70" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/%e7%94%a8%e4%ba%86%e4%b8%a4%e4%b8%aa%e6%96%b0%e6%8f%92%e4%bb%b6-mathjax%e5%92%8c%e5%a4%9a%e8%af%b4%e8%af%84%e8%ae%ba/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/%e7%94%a8%e4%ba%86%e4%b8%a4%e4%b8%aa%e6%96%b0%e6%8f%92%e4%bb%b6-mathjax%e5%92%8c%e5%a4%9a%e8%af%b4%e8%af%84%e8%ae%ba</feedburner:origLink></item>
		<item>
		<title>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/hDB4hiVA_2Q/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f</link>
		<comments>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f#comments</comments>
		<pubDate>Sun, 06 May 2012 06:19:18 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[机器学习]]></category>
		<category><![CDATA[52Opencourse]]></category>
		<category><![CDATA[Andrew Ng]]></category>
		<category><![CDATA[Cousera]]></category>
		<category><![CDATA[公开课]]></category>
		<category><![CDATA[单变量线性回归]]></category>
		<category><![CDATA[我爱公开课]]></category>
		<category><![CDATA[斯坦福大学]]></category>
		<category><![CDATA[梯度下降]]></category>
		<category><![CDATA[梯度下降算法]]></category>
		<category><![CDATA[线性回归]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4464</guid>
		<description><![CDATA[斯坦福大学机器学习第二课"单变量线性回归“学习笔记，本次课程主要包括7部分： 1) Model representation(模型表示) 2) Cost function(代价函数，成本函数) 3) Cost function intuition I(直观解释1) 4) Cost function intuition II(直观解释2) 5) Gradient descent(梯度下降) 6) Gradient descent intuition(梯度下降直观解释) 7) Gradient descent for linear regression(应用于线性回归的的梯度下降算法) 以下是第二课“单变量线性回归”的课件资料下载链接，视频可以在Coursera机器学习课程上观看或下载： PPT   PDF 另外课程答题时间推迟一周，具体可参考:  Coursera机器学习课程作业截止时间推迟一周 如转载52opencourse上的任何原创文章，请务必注明出处，原文见： Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with &#8230; <a href="http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”'>Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-second-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第二部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第二部分）</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-fourth-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第四部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-first-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第一部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第一部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-third-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第三部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第三部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-fourth-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第四部分）'>MIT自然语言处理第四讲：标注（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-fifth-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第五部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第五部分）</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>斯坦福大学机器学习第二课"单变量线性回归“学习笔记，本次课程主要包括7部分：</p>
<p>1) Model representation(模型表示)</p>
<p>2) Cost function(代价函数，成本函数)</p>
<p>3) Cost function intuition I(直观解释1)</p>
<p>4) Cost function intuition II(直观解释2)</p>
<p>5) Gradient descent(梯度下降)</p>
<p>6) Gradient descent intuition(梯度下降直观解释)</p>
<p>7) Gradient descent for linear regression(应用于线性回归的的梯度下降算法)</p>
<div>以下是第二课“单变量线性回归”的课件资料下载链接，视频可以在Coursera机器学习课程上观看或下载：</div>
<div><a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture2.pptx" rel="nofollow" target="_blank">PPT</a>   <a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture2.pdf" rel="nofollow" target="_blank">PDF</a></div>
<div></div>
<div>另外课程答题时间推迟一周，具体可参考:  <a href="http://52opencourse.com/67/coursera%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E8%AF%BE%E7%A8%8B%E4%BD%9C%E4%B8%9A%E6%88%AA%E6%AD%A2%E6%97%B6%E9%97%B4%E6%8E%A8%E8%BF%9F%E4%B8%80%E5%91%A8" rel="nofollow" target="_blank">Coursera机器学习课程作业截止时间推迟一周</a></div>
<div></div>
<div>如转载<a href="http://52opencourse.com/" rel="nofollow" target="_blank">52opencourse</a>上的任何原创文章，请务必注明出处，原文见：</div>
<div></div>
<div><a href="http://52opencourse.com/83/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%BA%8C%E8%AF%BE-%E5%8D%95%E5%8F%98%E9%87%8F%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92-linear-regression-with-one-variable" target="_blank">Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></div>
<div></div>
<div><span id="more-4464"></span></div>
<div></div>
<div>
<p>1) Model representation(模型表示)</p>
<p>回到<a href="http://52opencourse.com/54/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%B8%80%E8%AF%BE-%E5%BC%95%E8%A8%80-introduction" rel="nofollow" data-cke-saved-href="http://52opencourse.com/54/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%B8%80%E8%AF%BE-%E5%BC%95%E8%A8%80-introduction">第一课</a>中的房屋价格预测问题， 首先它是一个有监督学习的问题（对于每个样本的输入，都有正确的输出或者答案），同时它也是一个回归问题（预测一个实值输出）。</p>
<p>训练集表示如下：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=484206880651220945" alt="traing-set-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=484206880651220945" /></p>
<p>其中：</p>
<p>m = 训练样本的数目</p>
<p>x's = “输入”变量，也称之为特征</p>
<p>y's = “输出”变量，也称之为“目标”变量</p>
<p>&nbsp;</p>
<p>对于房价预测问题，学习过程可用下图表示：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=17111122787753216973" alt="model-represation-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=17111122787753216973" /></p>
<p>&nbsp;</p>
<p>其中x代表房屋的大小，y代表预测的价格，h(hypothesis)将输入变量 x 映射到输出变量 y，如何表示h?</p>
<p>事实上Hypothesis可以表示成如下形式：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_4939975821464e6e4cfea62375a0842c.gif' style='vertical-align: middle; border: none;' class='tex' alt="h_\theta(x) = \theta_0 + \theta_1 x" /></span><script type='math/tex;  mode=display'>h_\theta(x) = \theta_0 + \theta_1 x</script></p></p>
<p>简写为 h(x)，也就是带一个变量的线性回归或者单变量线性回归问题。</p>
<p>&nbsp;</p>
<p>2) Cost function(代价函数，成本函数)</p>
<p>对于Hypothesis:  <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_4939975821464e6e4cfea62375a0842c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x) = \theta_0 + \theta_1 x" /></span><script type='math/tex'>h_\theta(x) = \theta_0 + \theta_1 x</script></p>
<p><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_9fe4f6a929e86b5c5a7d19d4a18fc304.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_i" /></span><script type='math/tex'>\theta_i</script> 为参数</p>
<p>如何求<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_9fe4f6a929e86b5c5a7d19d4a18fc304.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_i" /></span><script type='math/tex'>\theta_i</script>?</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6540099477212750642" alt="theta-cost function-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=6540099477212750642" /></p>
<p>构想： 对于训练集(x, y)，选取参数<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_dbc9011a370bca098d4752346ba71d5c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0" /></span><script type='math/tex'>\theta_0</script>, <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7672d625e9a2492987c50d3b87c04349.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1" /></span><script type='math/tex'>\theta_1</script>使得<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_76a900850425e109ed72998dfa73814f.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x)" /></span><script type='math/tex'>h_\theta(x)</script>尽可能的接近y。</p>
<p>如何做呢？一种做法就是求训练集的平方误差函数（squared error function），Cost Function可表示为:</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7d849b5f308186d011b3d0ef6666f806.gif' style='vertical-align: middle; border: none;' class='tex' alt="J(\theta_0, \theta_1) = \frac{1}{2m}\sum_{i=1}^m{(h_\theta(x^{(i)}) - y^{(i)})^2}" /></span><script type='math/tex;  mode=display'>J(\theta_0, \theta_1) = \frac{1}{2m}\sum_{i=1}^m{(h_\theta(x^{(i)}) - y^{(i)})^2}</script></p></p>
<p>并且选取合适的参数使其最小化，数学表示如下：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_6f8ea00fc392932544c4b72e1e8d807e.gif' style='vertical-align: middle; border: none;' class='tex' alt="\displaystyle\mathop{\mathrm{minimize}}\limits_{\theta_0, \theta_1} J(\theta_0, \theta_1)" /></span><script type='math/tex;  mode=display'>\displaystyle\mathop{\mathrm{minimize}}\limits_{\theta_0, \theta_1} J(\theta_0, \theta_1)</script></p></p>
<p>3) Cost function intuition I(直观解释1)</p>
<p>直观来看，线性回归主要包括如下四大部分，分别是Hypothesis, Parameters, Cost Function, Goal:</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4054888681910087627" alt="costfunction-I-52opencourse.com" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=4054888681910087627" /></p>
<p>这里作者给出了一个简化版的Cost function解释，也就是令<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_dbc9011a370bca098d4752346ba71d5c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0" /></span><script type='math/tex'>\theta_0</script>为0：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5452571119435540646" alt="" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5452571119435540646" /></p>
<p>然后令<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7672d625e9a2492987c50d3b87c04349.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1" /></span><script type='math/tex'>\theta_1</script>分别取1、0.5、-0.5等值，同步对比<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_76a900850425e109ed72998dfa73814f.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x)" /></span><script type='math/tex'>h_\theta(x)</script>和<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script>在二维坐标系中的变化情况，具体可参考原PPT中的对比图，很直观。</p>
<p>&nbsp;</p>
<p>4) Cost function intuition II(直观解释2)</p>
<p>回顾线性回归的四个部分，这一次不在对Cost Function做简化处理，这个时候<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script>的图形是一个三维图或者一个等高线图，具体可参考原课件。</p>
<p>可以发现，当<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_76a900850425e109ed72998dfa73814f.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h_\theta(x)" /></span><script type='math/tex'>h_\theta(x)</script>的直线越来越接近样本点时，<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script>在等高线的图中的点越来越接近最小值的位置。</p>
<p>5) Gradient descent(梯度下降)</p>
<p>应用的场景之一-最小值问题：</p>
<p>对于一些函数，例如<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script></p>
<p>目标:  <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_87058b56afa8fc518897fae82c85c005.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\displaystyle\mathop{\mathrm{min}}\limits_{\theta_0, \theta_1} J(\theta_0, \theta_1)" /></span><script type='math/tex'>\displaystyle\mathop{\mathrm{min}}\limits_{\theta_0, \theta_1} J(\theta_0, \theta_1)</script></p>
<p>方法的框架:</p>
<p>1、给<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_dbc9011a370bca098d4752346ba71d5c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0" /></span><script type='math/tex'>\theta_0</script>, <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7672d625e9a2492987c50d3b87c04349.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1" /></span><script type='math/tex'>\theta_1</script>一个初始值，例如都等于0</p>
<p>2、每次改变<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_dbc9011a370bca098d4752346ba71d5c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0" /></span><script type='math/tex'>\theta_0</script>, <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7672d625e9a2492987c50d3b87c04349.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1" /></span><script type='math/tex'>\theta_1</script>的时候都保持<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script>递减，直到达到一个我们满意的最小值；</p>
<p>对于任一<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script> , 初始位置不同，最终达到的极小值点也不同，例如以下两个例子：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=17796887071118187401" alt="梯度下降-1-52opencourse.com" width="544" height="296" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=17796887071118187401" /></p>
<p>&nbsp;</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=1994066137237053851" alt="梯度下降2-52opencourse.com" width="516" height="269" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=1994066137237053851" /></p>
<p>&nbsp;</p>
<p>梯度下降算法：</p>
<p>重复下面的公式直到收敛：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7335397698768062177" alt="梯度下降算法" width="599" height="178" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7335397698768062177" /></p>
<p>&nbsp;</p>
<p>举例：</p>
<p>参数正确的更新过程如下（同步更新）：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=11913210550324121523" alt="梯度下降-3-52opencourse.com" width="369" height="179" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=11913210550324121523" /></p>
<p>&nbsp;</p>
<p>错误的更新过程如下：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=15322917682795131046" alt="梯度下降-4-52opencourse.com" width="370" height="182" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=15322917682795131046" /></p>
<p>&nbsp;</p>
<p>6) Gradient descent intuition(梯度下降直观解释)</p>
<p>举例，对于一个简化的<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_bd9ddffb1c72f2561a0e2c2152ce6adc.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_1)" /></span><script type='math/tex'>J(\theta_1)</script>来说，无论抛物线的左边还是右边，在梯度下降算法下，<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_0b2fbd1ecd1cf9e1c56393fe00263c8f.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1)" /></span><script type='math/tex'>\theta_1)</script>都是保持正确的方向（递增或递减）</p>
<p>对于learning rate(又称为步长)来说:</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5134208209914977484" alt="learning rate-我爱公开课—52opencourse.com" width="218" height="59" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=5134208209914977484" /></p>
<p>如果<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>过小，梯度下降可能很慢；如果过大，梯度下降有可能“迈过”（overshoot）最小点，并且有可能收敛失败，并且产生“分歧”(diverge)</p>
<p>梯度下降可以使函数收敛到一个局部最小值，特别对于learning rate <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_7b7f9dbfea05c83784f8b85149852f08.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="\alpha" /></span><script type='math/tex'>\alpha</script>是固定值的时候：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=8227277676618195492" alt="我爱公开课-52opencourse.com" width="573" height="297" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=8227277676618195492" /></p>
<p>当函数接近局部最小值的时候，梯度下降法将自动的采取“小步子”， 所以没有必要随着时间的推移减小learning rate.</p>
<p>关于梯度下降算法，可以参考维基百科的介绍： <a href="http://zh.wikipedia.org/wiki/%E6%A2%AF%E5%BA%A6%E4%B8%8B%E9%99%8D%E6%B3%95" rel="nofollow" data-cke-saved-href="http://zh.wikipedia.org/wiki/%E6%A2%AF%E5%BA%A6%E4%B8%8B%E9%99%8D%E6%B3%95">http://zh.wikipedia.org/wiki/%E6%A2%AF%E5%BA%A6%E4%B8%8B%E9%99%8D%E6%B3%95</a></p>
<p>&nbsp;</p>
<p>7) Gradient descent for linear regression(应用于线性回归的的梯度下降算法)</p>
<p>梯度下降算法：<br />
<img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=1147990197831711062" alt="梯度下降算法-我爱公开课-52opencourse.com" width="291" height="226" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=1147990197831711062" /></p>
<p>线性回归模型：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=9453514901512885273" alt="线性回归模型-我爱公开课—52opencouse.com" width="275" height="151" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=9453514901512885273" /></p>
<p><span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_d4eb1767194667065465c3bacef7264c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="J(\theta_0, \theta_1)" /></span><script type='math/tex'>J(\theta_0, \theta_1)</script>对于<span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_4ef24a04835161ec3141413bdfe58406.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_0)" /></span><script type='math/tex'>\theta_0)</script>, <span class='MathJax_Preview'><img src='http://www.52nlp.cn/wp-content/plugins/latex/cache/tex_0b2fbd1ecd1cf9e1c56393fe00263c8f.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\theta_1)" /></span><script type='math/tex'>\theta_1)</script>求导，得：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7154374951475732717" alt="梯度下降求导-我爱公开课-52opencouse.com" width="525" height="125" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7154374951475732717" /></p>
<p>在梯度下降算法中进行替换，就得到单变量线性回归梯度下降算法：</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7188581208030917774" alt="单变量信息回归梯度下降算法-我爱公开课-52opencourse.com" width="493" height="215" data-cke-saved-src="http://52opencourse.com/?qa=blob&amp;qa_blobid=7188581208030917774" /></p>
<p>详细的图形举例请参考官方PPT，主要是在等高线图举例梯度下降的收敛过程，逐步逼近最小值点，其中一幅图说明：线性回归函数是凸函数(convex function)，具有碗状（bowl shape)。</p>
<p>总结： 这里的梯度下降算法也称为"Batch" 梯度下降: 梯度下降的每一步都使用了所有的训练样本。</p>
<p>本文链接地址：<a title="链向 Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)” 的固定链接" href="../coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f" rel="bookmark">Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></p>
</div>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”'>Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”'>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-second-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第二部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第二部分）</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-fourth-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第四部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-first-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第一部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第一部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-third-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第三部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第三部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-fourth-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第四部分）'>MIT自然语言处理第四讲：标注（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fifth-lesson-maximum-entropy-and-log-linear-models-fifth-part' rel='bookmark' title='MIT自然语言处理第五讲：最大熵和对数线性模型（第五部分）'>MIT自然语言处理第五讲：最大熵和对数线性模型（第五部分）</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/hDB4hiVA_2Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f</feedburner:origLink></item>
		<item>
		<title>Ph.D. Level Graduate Research Assistants in Machine Learning and NLP</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/uj5zH5snP-o/ph-d-level-graduate-research-assistants-in-machine-learning-and-nlp</link>
		<comments>http://www.52nlp.cn/ph-d-level-graduate-research-assistants-in-machine-learning-and-nlp#comments</comments>
		<pubDate>Thu, 03 May 2012 20:18:40 +0000</pubDate>
		<dc:creator>tmtmtmtm</dc:creator>
				<category><![CDATA[自然语言处理]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4459</guid>
		<description><![CDATA[The Machine Learning and Natural Language Processing lab at the Kno.e.sis Center in the Department of Computer Science and Engineering at Wright State University is recruiting two, or more, highly motivated Ph.D. students to work on three projects: (1) Large &#8230; <a href="http://www.52nlp.cn/ph-d-level-graduate-research-assistants-in-machine-learning-and-nlp">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/recruiting-ph-d-students' rel='bookmark' title='recruiting Ph.D. students'>recruiting Ph.D. students</a></li>
<li><a href='http://www.52nlp.cn/from-google-research-blog-google-at-acl-2011' rel='bookmark' title='From Google Research Blog: Google at ACL 2011'>From Google Research Blog: Google at ACL 2011</a></li>
<li><a href='http://www.52nlp.cn/cfp-the-7th-young-researchers-roundtable-on-spoken-dialogue-systems' rel='bookmark' title='CFP: The 7th Young Researchers&#039; Roundtable on Spoken Dialogue Systems'>CFP: The 7th Young Researchers' Roundtable on Spoken Dialogue Systems</a></li>
<li><a href='http://www.52nlp.cn/%e8%bf%bd%e5%bf%86%e5%a4%a7%e5%b8%88%e8%b4%be%e9%87%8c%e5%b0%bc%e5%85%8b' rel='bookmark' title='追忆大师贾里尼克'>追忆大师贾里尼克</a></li>
<li><a href='http://www.52nlp.cn/me-for-machine-translation' rel='bookmark' title='ME for Machine Translation'>ME for Machine Translation</a></li>
<li><a href='http://www.52nlp.cn/acl-2010-paper-%e5%9b%bd%e5%86%85%e7%a0%94%e7%a9%b6%e5%8d%95%e4%bd%8d%e5%bd%95%e7%94%a8%e6%83%85%e5%86%b5' rel='bookmark' title='ACL 2010 Paper国内研究单位录用情况'>ACL 2010 Paper国内研究单位录用情况</a></li>
<li><a href='http://www.52nlp.cn/free-online-stanford-course-on-nlp' rel='bookmark' title='Free Online Stanford Course on NLP'>Free Online Stanford Course on NLP</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词五：一个混合的分词器'>Itenyh版-用HMM做中文分词五：一个混合的分词器</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-company-inxight' rel='bookmark' title='自然语言处理公司巡礼三：Inxight'>自然语言处理公司巡礼三：Inxight</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The Machine Learning and Natural Language Processing lab at the Kno.e.sis<br />
Center in the Department of Computer Science and Engineering at Wright State<br />
University is recruiting two, or more, highly motivated Ph.D. students to work on<br />
three projects: (1) Large Scale Distributed Language Modeling, (2) Semisupervised<br />
Structured Prediction, and (3) Direct Loss Minimization for<br />
Classification and Ranking Problems, that are funded by NSF, AFOSR and Google.<br />
The students are expected to have strong a) programming skills (past/current<br />
projects can serve as evidence), and b) analytical skills (knowledge in algorithms,<br />
optimization and statistics is essential). The research team currently consists of one<br />
faculty - Dr. Shaojun Wang (http://knoesis.wright.edu/faculty/swang/) and 4 Ph.D.<br />
students. They work together, have face-to-face in-depth discussions on a topic on<br />
a regular basis, and target publishing both technically strong and empirically solid<br />
papers at top machine learning and natural language processing conferences such<br />
as ICML, NIPS and ACL and journals such as Journal of Machine Learning<br />
Research and Computational Linguistics. Students have the opportunity to work as<br />
summer interns at IBM, Google, Microsoft, and others in their 3rd year after they<br />
enter the Ph.D. program. In the long run, Ph.D. students are expected to do<br />
independent research after graduation.<br />
Please contact Dr. Shaojun Wang at shaojun.wang@wright.edu for details.<br />
Also, please visit http://knoesis.wright.edu to learn more about the Kno.e.sis<br />
Center, the Ohio Center of Excellence in Knowledge-enabled Computing at Wright<br />
State University.</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/recruiting-ph-d-students' rel='bookmark' title='recruiting Ph.D. students'>recruiting Ph.D. students</a></li>
<li><a href='http://www.52nlp.cn/from-google-research-blog-google-at-acl-2011' rel='bookmark' title='From Google Research Blog: Google at ACL 2011'>From Google Research Blog: Google at ACL 2011</a></li>
<li><a href='http://www.52nlp.cn/cfp-the-7th-young-researchers-roundtable-on-spoken-dialogue-systems' rel='bookmark' title='CFP: The 7th Young Researchers&#039; Roundtable on Spoken Dialogue Systems'>CFP: The 7th Young Researchers' Roundtable on Spoken Dialogue Systems</a></li>
<li><a href='http://www.52nlp.cn/%e8%bf%bd%e5%bf%86%e5%a4%a7%e5%b8%88%e8%b4%be%e9%87%8c%e5%b0%bc%e5%85%8b' rel='bookmark' title='追忆大师贾里尼克'>追忆大师贾里尼克</a></li>
<li><a href='http://www.52nlp.cn/me-for-machine-translation' rel='bookmark' title='ME for Machine Translation'>ME for Machine Translation</a></li>
<li><a href='http://www.52nlp.cn/acl-2010-paper-%e5%9b%bd%e5%86%85%e7%a0%94%e7%a9%b6%e5%8d%95%e4%bd%8d%e5%bd%95%e7%94%a8%e6%83%85%e5%86%b5' rel='bookmark' title='ACL 2010 Paper国内研究单位录用情况'>ACL 2010 Paper国内研究单位录用情况</a></li>
<li><a href='http://www.52nlp.cn/free-online-stanford-course-on-nlp' rel='bookmark' title='Free Online Stanford Course on NLP'>Free Online Stanford Course on NLP</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词五：一个混合的分词器'>Itenyh版-用HMM做中文分词五：一个混合的分词器</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-company-inxight' rel='bookmark' title='自然语言处理公司巡礼三：Inxight'>自然语言处理公司巡礼三：Inxight</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/uj5zH5snP-o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/ph-d-level-graduate-research-assistants-in-machine-learning-and-nlp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/ph-d-level-graduate-research-assistants-in-machine-learning-and-nlp</feedburner:origLink></item>
		<item>
		<title>Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/YRoJ3NfeHDo/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct</link>
		<comments>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct#comments</comments>
		<pubDate>Thu, 26 Apr 2012 01:14:31 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[机器学习]]></category>
		<category><![CDATA[52Opencourse]]></category>
		<category><![CDATA[Andrew Ng]]></category>
		<category><![CDATA[Cousera]]></category>
		<category><![CDATA[Udacity]]></category>
		<category><![CDATA[公开课]]></category>
		<category><![CDATA[我爱公开课]]></category>
		<category><![CDATA[斯坦福大学]]></category>
		<category><![CDATA[无监督学习]]></category>
		<category><![CDATA[有监督学习]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4390</guid>
		<description><![CDATA[注：这是我在“我爱公开课”上做的学习笔记，会在52opencourse和这里同步更新。随着Coursera和Udacity这样的注重交互式的网络课堂的兴起，相信传统教育模式即将遭到颠覆。欢迎大家在52opencourse这个问答平台上进行交流，希望能为大家提供一个开放、免费、高质量以及世界级的公开课中文交流平台和桥梁。 以下转自原文: Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)” Coursera上于4月23号启动了6门公开课，其中包括斯坦福大学于“机器学习”课程，由机器学习领域的大牛Andrew Ng教授授课： https://www.coursera.org/course/ml 课程刚刚开始，对机器学习感兴趣的同学尽量注册，这样即使没有时间学习，获取相关资料特别是视频比较方便。 由于工作繁忙的缘故，这批科目里我主要想系统的学习一下“机器学习”课程，所以计划在52opencourse和52nlp上同步我的机器学习课程笔记，一方面做个记录和总结，另一方面方便后来者参考。 Coursera上机器学习的课程学习过程是这样的：看Andrew Ng教授的授课视频或者看看课程相关的ppt；答系统随机出的题，一般5道题，单选、多选甚至填空，满分5分；编程作业，需用Octave(和 Matlab相似的开源编程语言)完成，提交给系统得分，在规定时间内完成，均取最高分，超过规定时间会对得分打折。 第一周（4月23日-4月29日）的课程包括三课： Introduction(引言) Linear Regression with One Variable(单变量线性回归) (Optional) Linear Algebra Review(线性代数回顾)(对于线性代数熟悉的同学可以选修) 4月30日是答题(Review Questions)截至时间。 以下是第一课“引言”的PPT课件资料，视频可以在Coursera机器学习课程上观看或下载： PPT   PDF 以下是本课程的学习笔记，除了参考机器学习课程本身的内容外，还参考网上其他资料，特别是维基百科来做注解，欢迎学习该课程的同学在“我爱公开课”上进行探讨。 一、机器学习概览 1）机器学习定义:机器学习是人工智能的一个分支，目标是赋予机器一种新的能力。机器学习的应用很广泛，例如大规模的数据挖掘（网页点击数据，医疗记录等），无人驾驶飞机、汽车，手写手别，大多数的自然语言处理任务，计算机视觉，推荐系统等。 机器学习有很多定义，广为人知的有如下两条： Arthur Samuel (1959): Machine Learning: Field of study &#8230; <a href="http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”'>Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/%e7%ab%8b%e5%a7%94%e9%9a%8f%e7%ac%94-%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e5%92%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='立委随笔：机器学习和自然语言处理'>立委随笔：机器学习和自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/%e7%90%86%e8%a7%a3em%e7%ae%97%e6%b3%95' rel='bookmark' title='理解EM算法'>理解EM算法</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%80%e4%b8%aa%e4%b8%8d%e9%94%99%e7%9a%84%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%e8%af%8d%e5%85%b8' rel='bookmark' title='一个不错的自然语言处理词典'>一个不错的自然语言处理词典</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>注：这是我在“<a title="我爱公开课" href="http://52opencourse.com/" target="_blank">我爱公开课</a>”上做的学习笔记，会在52opencourse和这里同步更新。随着Coursera和Udacity这样的注重交互式的网络课堂的兴起，相信传统教育模式即将遭到颠覆。欢迎大家在<a href="http://52opencourse.com/" target="_blank">52opencourse</a>这个问答平台上进行交流，希望能为大家提供一个开放、免费、高质量以及世界级的公开课中文交流平台和桥梁。</p>
<p>以下转自原文:<a href="http://52opencourse.com/54/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%B8%80%E8%AF%BE-%E5%BC%95%E8%A8%80-introduction" target="_blank"> Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)”</a></p>
<p>Coursera上于4月23号启动了6门公开课，其中包括斯坦福大学于“机器学习”课程，由机器学习领域的大牛Andrew Ng教授授课：</p>
<p><a href="https://www.coursera.org/course/ml" rel="nofollow" target="_blank">https://www.coursera.org/course/ml</a></p>
<p>课程刚刚开始，对机器学习感兴趣的同学尽量注册，这样即使没有时间学习，获取相关资料特别是视频比较方便。</p>
<p>由于工作繁忙的缘故，这批科目里我主要想系统的学习一下“机器学习”课程，所以计划在<a href="http://52opencourse.com/" rel="nofollow">52opencourse</a>和52nlp上同步我的机器学习课程笔记，一方面做个记录和总结，另一方面方便后来者参考。</p>
<p>Coursera上机器学习的课程学习过程是这样的：看Andrew Ng教授的授课视频或者看看课程相关的ppt；答系统随机出的题，一般5道题，单选、多选甚至填空，满分5分；编程作业，需用Octave(和 Matlab相似的开源编程语言)完成，提交给系统得分，在规定时间内完成，均取最高分，超过规定时间会对得分打折。</p>
<p>第一周（4月23日-4月29日）的课程包括三课：</p>
<div>
<div>
<ul>
<li>Introduction(引言)</li>
<li>Linear Regression with One Variable(单变量线性回归)</li>
<li>(Optional) Linear Algebra Review(线性代数回顾)(对于线性代数熟悉的同学可以选修)</li>
</ul>
</div>
<div>4月30日是答题(Review Questions)截至时间。</div>
<div></div>
<div>以下是第一课“引言”的PPT课件资料，视频可以在Coursera机器学习课程上观看或下载：</div>
<div><a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture1.pptx" rel="nofollow" target="_blank">PPT</a>   <a href="https://d19vezwu8eufl6.cloudfront.net/ml/docs%2Fslides%2FLecture1.pdf" rel="nofollow" target="_blank">PDF</a></div>
<div></div>
<div>以下是本课程的学习笔记，除了参考机器学习课程本身的内容外，还参考网上其他资料，特别是维基百科来做注解，欢迎学习该课程的同学在“<a href="http://52opencourse.com/" rel="nofollow">我爱公开课</a>”上进行探讨。</div>
</div>
<div></div>
<p><span id="more-4390"></span></p>
<div>一、机器学习概览<br />
1）机器学习定义:机器学习是人工智能的一个分支，目标是赋予机器一种新的能力。机器学习的应用很广泛，例如大规模的数据挖掘（网页点击数据，医疗记录等），无人驾驶飞机、汽车，手写手别，大多数的自然语言处理任务，计算机视觉，推荐系统等。 机器学习有很多定义，广为人知的有如下两条：</p>
<p>Arthur Samuel (1959): Machine Learning: Field of study that gives computers the ability to learn without being explicitly programmed.</p>
<p>注：Arthur Lee Samuel (1901–1990) 教授是美国人工智能领域的先驱，他设计了一些下棋程序，可以通过不断的下棋来学习，从而达到很高的下棋水平。</p>
<p>Tom Mitchell (1998) : Well-posed Learning Problem: A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.</p>
<p>例子：对于一个垃圾邮件识别的问题，将邮件分类为垃圾邮件或非垃圾邮件是任务T，查看哪些邮件被标记为垃圾邮件哪些被标记为非垃圾邮件是经验E，正确识别的垃圾邮件或非垃圾邮件的数量或比率是评测指标P。</p>
<p>2）机器学习算法的类型</p>
<p>1、有监督学习(Supervised learning):通过生成一个函数将输入映射为一个合适的输出（通常也称为标记，多数情况下训练集都是有人工专家标注生成的）。例如分类问题，分类器 更加输入向量和输出的分类标记模拟了一个函数，对于新的输入向量，得到它的分类结果。</p>
<p>2、无监督学习(Unsupervised learning):与有监督学习相比，训练集没有人为标注的结果。常见的无监督学习算法有聚类。</p>
<p>3、半监督学习: 介于监督学习与无监督学习之间。</p>
<p>4、强化学习(Reinforcement learning): 通过观察来学习如何做出动作，每个动作都会对环境有所影响，而环境的反馈又可以引导该学习算法。</p>
<p>其他的类型包括推荐系统，Transduction，Learning to learn等。</p>
</div>
<div></div>
<div>
<p>3）有监督学习详解</p>
<p>有监督学习主要会提供一些标注样本，分为两大问题：回归和分类</p>
<p>房屋价格预测-回归(Regression): 预测连续的输出值（价格)</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=17695443231874431326" alt="有监督学习举例-房屋价格预测-52opencourse.com" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>乳腺癌（良性，恶性）预测问题-分类(Classification): 预测离散的输出值(0, 1)</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=12009466678209735638" alt="乳腺癌预测问题-52opencourse.com" width="641" height="297" /></p>
<p>&nbsp;</p>
<div id="voting_57"></div>
<div>4) 无监督学习详解:有监督学习和无监督学习的对比，看图更形象：<img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=15936672432775261746" alt="有监督学习-我爱公开课-52opencourse.com" />                              <img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=16551790796507723392" alt="无监督学习-我爱公开课-52opencourse.com" /></p>
<p>例子: Google News， 基因序列分析，社会网络分析，市场切分等...</p>
<p>&nbsp;</p>
<p>特别的例子：鸡尾酒会问题（Cocktail party problem）</p>
<p>“ 鸡尾酒会问题”（cocktail party problem）是在计算机语音识别领域的一个问题，当前语音识别技术已经可以以较高精度识别一个人所讲的话，但是当说话的人数为两人或者多人时，语音识别率就会极大的降低，这一难题被称为鸡尾酒会问题。</p>
<p><img src="http://52opencourse.com/?qa=blob&amp;qa_blobid=2578963396071545839" alt="鸡尾酒会问题-我爱公开课-52opencouse.com" /></p>
<p>鸡尾酒会问题算法（一行代码）：</p>
<p>[W,s,v] = svd((repmat(sum(x.*x,1),size(x,1),1).*x)*x');</p>
<p>&nbsp;</p>
<p>一些参考资料：</p>
<p>解决方法ICA demo: <a href="http://research.ics.tkk.fi/ica/cocktail/cocktail_en.cgi" rel="nofollow">http://research.ics.tkk.fi/ica/cocktail/cocktail_en.cgi</a></p>
<p><a href="http://www.vislab.uq.edu.au/education/sc3/2001/johan/johan.pdf" rel="nofollow">http://www.vislab.uq.edu.au/education/sc3/2001/johan/johan.pdf</a></p>
<p><a href="http://www.physorg.com/news75477497.html" rel="nofollow">http://www.physorg.com/news75477497.html</a></p>
<p>http://en.wikipedia.org/wiki/Cocktail_party_effect</p>
<p><a href="http://www.scientificamerican.com/article.cfm?id=solving-the-cocktail-party-problem" rel="nofollow">http://www.scientificamerican.com/article.cfm?id=solving-the-cocktail-party-problem</a></p>
<p>&nbsp;</p>
<p>以下关于"cocktail party problem"的文字引用自该链接：<a href="http://xiaozu.renren.com/xiaozu/121443/thread/335879281" rel="nofollow">http://xiaozu.renren.com/xiaozu/121443/thread/335879281</a></p>
<p>stanford机器学习公开课(ml-class.org)第一章unsupervised learning那段视频里解决鸡尾酒会问题(cocktail party problem)就写了一行代码：</p>
<p>[W,s,v] = svd ((repmat(sum(x.*x,1),size(x,1),1).*x)*x');</p>
<p>lz土人感觉是用了PCA的方法。。可是W运行出来丝毫没有unmixing的效果。。。用的是采样频率16kHz的Speech-Speech和Speech-Music<a href="http://www.renren.com/" rel="nofollow">两个样例</a>。。</p>
<p>google这条代码有<a href="http://www.renren.com/" rel="nofollow">post</a>说这是ICA，我就迷茫了。。。看不出来怎么是ICA了。。折腾一夜了，毫无头绪。。。</p>
<p>顺便求此问题的demo。。各种语言均无妨。。</p>
<p>本文链接地址：<a href="http://www.52nlp.cn/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%B8%80%E8%AF%BE%E5%BC%95%E8%A8%80introduct">http://www.52nlp.cn/coursera%E5%85%AC%E5%BC%80%E8%AF%BE%E7%AC%94%E8%AE%B0-%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E7%AC%AC%E4%B8%80%E8%AF%BE%E5%BC%95%E8%A8%80introduct</a></p>
<p>&nbsp;</p>
</div>
</div>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%ba%8c%e8%af%be%e5%8d%95%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”'>Coursera公开课笔记: 斯坦福大学机器学习第二课“单变量线性回归(Linear regression with one variable)”</a></li>
<li><a href='http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e5%9b%9b%e8%af%be%e5%a4%9a%e5%8f%98%e9%87%8f' rel='bookmark' title='Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”'>Coursera公开课笔记: 斯坦福大学机器学习第四课“多变量线性回归(Linear Regression with Multiple Variables)”</a></li>
<li><a href='http://www.52nlp.cn/%e8%85%be%e8%ae%af%e6%90%9c%e7%b4%a2%e5%b9%bf%e5%91%8a%e5%b9%b3%e5%8f%b0%e9%83%a8%e6%8b%9b%e8%81%98%e5%b7%a5%e7%a8%8b%e5%b8%88' rel='bookmark' title='腾讯搜索广告平台部招聘工程师'>腾讯搜索广告平台部招聘工程师</a></li>
<li><a href='http://www.52nlp.cn/%e7%ab%8b%e5%a7%94%e9%9a%8f%e7%ac%94-%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e5%92%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='立委随笔：机器学习和自然语言处理'>立委随笔：机器学习和自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/%e6%9d%a1%e4%bb%b6%e9%9a%8f%e6%9c%ba%e5%9c%ba%e6%96%87%e7%8c%ae%e9%98%85%e8%af%bb%e6%8c%87%e5%8d%97' rel='bookmark' title='条件随机场文献阅读指南'>条件随机场文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/%e7%90%86%e8%a7%a3em%e7%ae%97%e6%b3%95' rel='bookmark' title='理解EM算法'>理解EM算法</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%80%e4%b8%aa%e4%b8%8d%e9%94%99%e7%9a%84%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%e8%af%8d%e5%85%b8' rel='bookmark' title='一个不错的自然语言处理词典'>一个不错的自然语言处理词典</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/YRoJ3NfeHDo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/coursera%e5%85%ac%e5%bc%80%e8%af%be%e7%ac%94%e8%ae%b0-%e6%96%af%e5%9d%a6%e7%a6%8f%e5%a4%a7%e5%ad%a6%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%ac%ac%e4%b8%80%e8%af%be%e5%bc%95%e8%a8%80introduct</feedburner:origLink></item>
		<item>
		<title>推荐《用Python进行自然语言处理》中文翻译-NLTK配套书</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/vwiw4PW8BTM/%e6%8e%a8%e8%8d%90%ef%bc%8d%e7%94%a8python%e8%bf%9b%e8%a1%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%ef%bc%8d%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91-nltk%e9%85%8d%e5%a5%97%e4%b9%a6</link>
		<comments>http://www.52nlp.cn/%e6%8e%a8%e8%8d%90%ef%bc%8d%e7%94%a8python%e8%bf%9b%e8%a1%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%ef%bc%8d%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91-nltk%e9%85%8d%e5%a5%97%e4%b9%a6#comments</comments>
		<pubDate>Tue, 17 Apr 2012 11:34:57 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[中文信息处理]]></category>
		<category><![CDATA[自然语言处理]]></category>
		<category><![CDATA[nltk]]></category>
		<category><![CDATA[NLTK书籍]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[用Python进行自然语言处理]]></category>
		<category><![CDATA[自然语言处理书籍]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4380</guid>
		<description><![CDATA[　　NLTK配套书《用Python进行自然语言处理》(Natural Language Processing with Python)已经出版好几年了，但是国内一直没有翻译的中文版，虽然读英文原版是最好的选择，但是对于多数读者，如果有中文版，一定是不错的。下午在微博上看到陈涛sean 同学提供了NLTK配套书的中译本下载，就追问了一下，之后译者和我私信联系，并交流了一下，才发现是作者无偿翻译的，并且没有出版计划的。翻译是个很苦的差事，向译者致敬，另外译者说里面有一些错误，希望能得到nlper们的指正，大家一起来修正这个珍贵的NLTK中文版吧。另外译者希望在“52nlp”上做个推荐，这事是造福nlper的好事，我已经在“资源”里更新了本书的链接，以下是书的下载地址： PYTHON自然语言处理中文翻译-NLTK Natural Language Processing with Python 中文版 　　翻看了一下翻译版，且不说翻译质量，单看排版就让人觉得向一本正式的翻译书籍，说明译者是非常有心的。以下是从翻译版中摘录的“译者的话”: 　　作为一个自然语言处理的初学者，看书看到“训练模型”，这模型那模型的，一直不知 道模型究竟是什么东西。看了这本书，从预处理数据到提取特征集，训练模型，测试修改等，一步一步实际操作了之后，才对模型一词有了直观的认识（算法的中间结果，存储在计算机中的一个个pkl 文件，测试的时候直接用，前面计算过的就省了）。以后听人谈“模型”的时候也有了底气。当然，模型还有很多其他含义。还有动词的“配价”、各种搭配、客观逻辑对根据文法生成的句子的约束如何实现？不上机动手做做，很难真正领悟。 　　自然语言处理理论书籍很多，讲实际操作的不多，能讲的这么系统的更少。从这个角度 讲，本书是目前世界上最好的自然语言处理实践教程。初学者若在看过理论之后能精读本书，必定会有获益。这也是翻译本书的目的之一。 　　本书是译者课余英文翻译练习，抛砖引玉。书中存在很多问题，尤其是第10 章命题逻 辑和一阶逻辑推理在自然语言处理中的应用。希望大家多多指教。可以在微博上找到我（w eibo.com/chentao1999）。虽然读中文翻译速度更快，但直接读原文更能了解作者的本意。 　　原书作者在书的最后列出了迫切需要帮助改进的条目，对翻译本书建议使用目标语言的 例子，目前本书还只能照搬英文的例子，希望有志愿者能加入本书的中文化进程中，为中文 自然语言处理做出贡献。 　　将本书作学习和研究之用，欢迎传播、复制、修改。山寨产品请留下译者姓名和微博。 用于商业目的，请与原书版权所有者联系，译者不承担由此产生的责任。 翻译：陈涛（weibo.com/chentao1999） 2012 年4 月7 日 　　 最后希望大家在读这本书的过程中，记录一下需要勘误的地方，可以在“评论”中给出勘误建议，一起来修正这本书。谢谢！ 相关文章: Google's Python Class 如何学习自然语言处理 &#8230; <a href="http://www.52nlp.cn/%e6%8e%a8%e8%8d%90%ef%bc%8d%e7%94%a8python%e8%bf%9b%e8%a1%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%ef%bc%8d%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91-nltk%e9%85%8d%e5%a5%97%e4%b9%a6">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/googles-python-class' rel='bookmark' title='Google&#039;s Python Class'>Google's Python Class</a></li>
<li><a href='http://www.52nlp.cn/getting-started-in-natural-language-processing' rel='bookmark' title='如何学习自然语言处理'>如何学习自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/googles-python-class-sos' rel='bookmark' title='Google&#039;s Python Class - SOS'>Google's Python Class - SOS</a></li>
<li><a href='http://www.52nlp.cn/the-knowledge-and-action-in-natural-language-processing' rel='bookmark' title='“知行合一”与自然语言处理'>“知行合一”与自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/mapreduce%e4%b8%8e%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='MapReduce与自然语言处理'>MapReduce与自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/provides-several-natural-language-processing-book' rel='bookmark' title='提供几本自然语言处理书'>提供几本自然语言处理书</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d8' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词8'>Beautiful Data-统计语言模型的应用三：分词8</a></li>
<li><a href='http://www.52nlp.cn/googles-python-class-sos-%e7%bb%ad-%e4%b8%8b%e8%bd%bd' rel='bookmark' title='Google’s Python Class SOS 续 --下载'>Google’s Python Class SOS 续 --下载</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-6' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注6'>HMM在自然语言处理中的应用一：词性标注6</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-wiki-published' rel='bookmark' title='自然语言处理百科正式发布'>自然语言处理百科正式发布</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>　　NLTK配套书《用Python进行自然语言处理》(Natural Language Processing with Python)已经出版好几年了，但是国内一直没有翻译的中文版，虽然读英文原版是最好的选择，但是对于多数读者，如果有中文版，一定是不错的。下午在微博上看到<a href="http://weibo.com/chentao1999" target="_blank">陈涛sean</a> 同学提供了NLTK配套书的中译本下载，就追问了一下，之后译者和我私信联系，并交流了一下，才发现是作者无偿翻译的，并且没有出版计划的。翻译是个很苦的差事，向译者致敬，另外译者说里面有一些错误，希望能得到nlper们的指正，大家一起来修正这个珍贵的NLTK中文版吧。另外译者希望在“52nlp”上做个推荐，这事是造福nlper的好事，我已经在“资源”里更新了本书的链接，以下是书的下载地址：</p>
<p><a href="http://vdisk.weibo.com/s/4ffue/1334656530" target="_blank">PYTHON自然语言处理中文翻译-NLTK Natural Language Processing with Python 中文版</a></p>
<p>　　翻看了一下翻译版，且不说翻译质量，单看排版就让人觉得向一本正式的翻译书籍，说明译者是非常有心的。以下是从翻译版中摘录的“译者的话”:</p>
<p>　　作为一个自然语言处理的初学者，看书看到“训练模型”，这模型那模型的，一直不知<br />
道模型究竟是什么东西。看了这本书，从预处理数据到提取特征集，训练模型，测试修改等，一步一步实际操作了之后，才对模型一词有了直观的认识（算法的中间结果，存储在计算机中的一个个pkl 文件，测试的时候直接用，前面计算过的就省了）。以后听人谈“模型”的时候也有了底气。当然，模型还有很多其他含义。还有动词的“配价”、各种搭配、客观逻辑对根据文法生成的句子的约束如何实现？不上机动手做做，很难真正领悟。</p>
<p>　　自然语言处理理论书籍很多，讲实际操作的不多，能讲的这么系统的更少。从这个角度<br />
讲，本书是目前世界上最好的自然语言处理实践教程。初学者若在看过理论之后能精读本书，必定会有获益。这也是翻译本书的目的之一。</p>
<p>　　本书是译者课余英文翻译练习，抛砖引玉。书中存在很多问题，尤其是第10 章命题逻<br />
辑和一阶逻辑推理在自然语言处理中的应用。希望大家多多指教。可以在微博上找到我（w<br />
eibo.com/chentao1999）。虽然读中文翻译速度更快，但直接读原文更能了解作者的本意。</p>
<p>　　原书作者在书的最后列出了迫切需要帮助改进的条目，对翻译本书建议使用目标语言的<br />
例子，目前本书还只能照搬英文的例子，希望有志愿者能加入本书的中文化进程中，为中文<br />
自然语言处理做出贡献。</p>
<p>　　将本书作学习和研究之用，欢迎传播、复制、修改。山寨产品请留下译者姓名和微博。<br />
用于商业目的，请与原书版权所有者联系，译者不承担由此产生的责任。</p>
<p>翻译：陈涛（weibo.com/chentao1999）</p>
<p>2012 年4 月7 日</p>
<p>　　 最后希望大家在读这本书的过程中，记录一下需要勘误的地方，可以在“评论”中给出勘误建议，一起来修正这本书。谢谢！</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/googles-python-class' rel='bookmark' title='Google&#039;s Python Class'>Google's Python Class</a></li>
<li><a href='http://www.52nlp.cn/getting-started-in-natural-language-processing' rel='bookmark' title='如何学习自然语言处理'>如何学习自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/googles-python-class-sos' rel='bookmark' title='Google&#039;s Python Class - SOS'>Google's Python Class - SOS</a></li>
<li><a href='http://www.52nlp.cn/the-knowledge-and-action-in-natural-language-processing' rel='bookmark' title='“知行合一”与自然语言处理'>“知行合一”与自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/mapreduce%e4%b8%8e%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86' rel='bookmark' title='MapReduce与自然语言处理'>MapReduce与自然语言处理</a></li>
<li><a href='http://www.52nlp.cn/provides-several-natural-language-processing-book' rel='bookmark' title='提供几本自然语言处理书'>提供几本自然语言处理书</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d8' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词8'>Beautiful Data-统计语言模型的应用三：分词8</a></li>
<li><a href='http://www.52nlp.cn/googles-python-class-sos-%e7%bb%ad-%e4%b8%8b%e8%bd%bd' rel='bookmark' title='Google’s Python Class SOS 续 --下载'>Google’s Python Class SOS 续 --下载</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-6' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注6'>HMM在自然语言处理中的应用一：词性标注6</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-wiki-published' rel='bookmark' title='自然语言处理百科正式发布'>自然语言处理百科正式发布</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/vwiw4PW8BTM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/%e6%8e%a8%e8%8d%90%ef%bc%8d%e7%94%a8python%e8%bf%9b%e8%a1%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%ef%bc%8d%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91-nltk%e9%85%8d%e5%a5%97%e4%b9%a6/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/%e6%8e%a8%e8%8d%90%ef%bc%8d%e7%94%a8python%e8%bf%9b%e8%a1%8c%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86%ef%bc%8d%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91-nltk%e9%85%8d%e5%a5%97%e4%b9%a6</feedburner:origLink></item>
		<item>
		<title>转载:　Topic modeling made just simple enough</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/L10OEA6Puio/%e8%bd%ac%e8%bd%bd-topic-modeling-made-just-simple-enough</link>
		<comments>http://www.52nlp.cn/%e8%bd%ac%e8%bd%bd-topic-modeling-made-just-simple-enough#comments</comments>
		<pubDate>Sun, 15 Apr 2012 07:24:32 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[自然语言处理]]></category>
		<category><![CDATA[LDA]]></category>
		<category><![CDATA[Topic Model]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4373</guid>
		<description><![CDATA[在微博上看到 @c0d3r_Jia 同学发的一条信息： 这篇讲LDA更"人道"一些，比那些用来证明自己算法正确的文章清楚很多。不过也提到，LDA或者概率模型要用好，需要不断的筛选features、精选进行操作的token才行。// Topic modeling made just simple enough http://t.cn/zOpOc4D //喜欢这样的文章是不是就是Sheldon看不上Leonard很重要的方面，呵呵 就打开链接看了一下，然后转发了，再之后有同学反映文章被墙了，才发现这篇文章发表在wordpress.com上，转载在这里吧，有需要的同学可以看看，原文见：Topic modeling made just simple enough &#160; Topic modeling made just simple enough. Posted on April 7, 2012 Right now, humanists often have to take topic modeling on faith. There &#8230; <a href="http://www.52nlp.cn/%e8%bd%ac%e8%bd%bd-topic-modeling-made-just-simple-enough">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/coling-2010-prospect' rel='bookmark' title='COLING 2010前瞻——规则与统计共舞，语言随计算齐飞'>COLING 2010前瞻——规则与统计共舞，语言随计算齐飞</a></li>
<li><a href='http://www.52nlp.cn/cfp-the-7th-young-researchers-roundtable-on-spoken-dialogue-systems' rel='bookmark' title='CFP: The 7th Young Researchers&#039; Roundtable on Spoken Dialogue Systems'>CFP: The 7th Young Researchers' Roundtable on Spoken Dialogue Systems</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%e6%8a%80%e6%9c%af%e6%b2%99%e9%be%99%e7%ac%ac%e4%b9%9d%e6%ac%a1%e6%b4%bb%e5%8a%a8' rel='bookmark' title='中文翻译技术沙龙第九次活动'>中文翻译技术沙龙第九次活动</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%93%e4%b8%9a%e8%80%81%e5%8f%8b%e7%97%9b%e6%89%b9%e7%ab%8b%e5%a7%94%e3%80%8a%e8%bf%b7%e6%80%9d%e3%80%8b%e7%b3%bb%e5%88%97%e6%90%85%e4%b9%b1nlp%e7%a7%a9%e5%ba%8f%ef%bc%8c%e7%ab%8b%e5%a7%94' rel='bookmark' title='专业老友痛批立委《迷思》系列搅乱NLP秩序，立委固执己见'>专业老友痛批立委《迷思》系列搅乱NLP秩序，立委固执己见</a></li>
<li><a href='http://www.52nlp.cn/acl-2012-accepted-long-papers-oral' rel='bookmark' title='ACL 2012 Accepted Long Papers (ORAL)'>ACL 2012 Accepted Long Papers (ORAL)</a></li>
<li><a href='http://www.52nlp.cn/acl-ijcnlp-2009-running-one' rel='bookmark' title='ACL-IJCNLP 2009会议进行时一'>ACL-IJCNLP 2009会议进行时一</a></li>
<li><a href='http://www.52nlp.cn/acl-ijcnlp-2009-running-two' rel='bookmark' title='ACL-IJCNLP 2009会议进行时二'>ACL-IJCNLP 2009会议进行时二</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>在微博上看到 <a title="c0d3r_Jia" href="http://weibo.com/mijia">@c0d3r_Jia</a> 同学发的一条信息：<em></em></p>
<p><em>这篇讲LDA更"人道"一些，比那些用来证明自己算法正确的文章清楚很多。不过也提到，LDA或者概率模型要用好，需要不断的筛选features、精选进行操作的token才行。// Topic modeling made just simple enough <a title="http://tedunderwood.wordpress.com/2012/04/07/topic-modeling-made-just-simple-enough/" href="http://t.cn/zOpOc4D" target="_blank">http://t.cn/zOpOc4D</a> //喜欢这样的文章是不是就是Sheldon看不上Leonard很重要的方面，呵呵</em></p>
<p>就打开链接看了一下，然后转发了，再之后有同学反映文章被墙了，才发现这篇文章发表在wordpress.com上，转载在这里吧，有需要的同学可以看看，原文见：<a href="http://tedunderwood.wordpress.com/2012/04/07/topic-modeling-made-just-simple-enough/">Topic modeling made just simple enough </a><br />
<span id="more-4373"></span><br />
&nbsp;</p>
<h1>Topic modeling made just simple enough.</h1>
<div>Posted on <a title="9:17 am" href="http://tedunderwood.wordpress.com/2012/04/07/topic-modeling-made-just-simple-enough/" rel="bookmark">April 7, 2012</a></div>
<p>Right now, humanists often have to take topic modeling on faith. There are several good posts out there that introduce the principle of the thing (by <a href="http://www.stanford.edu/%7Emjockers/cgi-bin/drupal/node/61" target="_blank">Matt Jockers</a>, for instance, and <a href="http://www.scottbot.net/HIAL/?p=221" target="_blank">Scott Weingart</a>). But it’s a long step up from those posts to the computer-science articles that explain “Latent Dirichlet Allocation” mathematically. My goal in this post is to provide a bridge between those two levels of difficulty.</p>
<p>Computer scientists make LDA seem complicated because they care about proving that their algorithms work. And the proof is indeed brain-squashingly hard. But the <em>practice</em> of topic modeling makes good sense on its own, without proof, and does not require you to spend even a second thinking about “Dirichlet distributions.” When the math is approached in a practical way, I think humanists will find it easy, intuitive, and empowering. This post focuses on LDA as shorthand for a broader family of “probabilistic” techniques. I’m going to ask how they work, what they’re for, and what their limits are.</p>
<p><strong>How does it work?</strong> Say we’ve got a collection of documents, and we want to identify underlying “topics” that organize the collection. Assume that each document contains a mixture of different topics. Let’s also assume that a “topic” can be understood as a collection of words that have different probabilities of appearance in passages discussing the topic. One topic might contain many occurrences of “organize,” “committee,” “direct,” and “lead.” Another might contain a lot of “mercury” and “arsenic,” with a few occurrences of “lead.” (Most of the occurrences of “lead” in this second topic, incidentally, are nouns instead of verbs; part of the value of LDA will be that it implicitly sorts out the different contexts/meanings of a written symbol.)</p>
<p><a href="https://tedunderwood.files.wordpress.com/2012/04/shapeart.png"><img title="ShapeArt" src="https://tedunderwood.files.wordpress.com/2012/04/shapeart.png?w=640" alt="The assumptions behind topic modeling." /></a><br />
Of course, we can’t directly observe topics; in reality all we have are documents. Topic modeling is a way of extrapolating backward from a collection of documents to infer the discourses (“topics”) that could have generated them. (The notion that documents are produced by discourses rather than authors is alien to common sense, but not alien to literary theory.) Unfortunately, there is no way to infer the topics exactly: there are too many unknowns. But pretend for a moment that we had the problem mostly solved. Suppose we knew which topic produced every word in the collection, except for this <em>one</em> word in document <em>D</em>. The word happens to be “lead,” which we’ll call word type <em>W</em>. How are we going to decide whether this occurrence of <em>W</em> belongs to topic <em>Z</em>?</p>
<p>We can’t know for sure. But one way to guess is to consider two questions. A) How often does “lead” appear in topic <em>Z</em> elsewhere? If “lead” often occurs in discussions of <em>Z</em>, then this instance of “lead” might belong to <em>Z</em> as well. But a word can be common in more than one topic. And we don’t want to assign “lead” to a topic about leadership if this document is mostly about heavy metal contamination. So we also need to consider B) How common is topic <em>Z</em> in the rest of this document?</p>
<p>Here’s what we’ll do. For each possible topic <em>Z</em>, we’ll multiply the frequency of this word type <em>W</em> in <em>Z</em> by the number of other words in document <em>D</em> that already belong to <em>Z</em>. The result will represent the probability that this word came from <em>Z</em>. Here’s the actual formula:</p>
<p><a href="http://tedunderwood.files.wordpress.com/2012/04/ldaformula.png"><img title="LDAformula" src="http://tedunderwood.files.wordpress.com/2012/04/ldaformula.png?w=640&amp;h=100" alt="" width="640" height="100" /></a><br />
Simple enough. Okay, yes, there are a few Greek letters scattered in there, but they aren’t terribly important. They’re called “hyperparameters” — stop right there! I see you reaching to close that browser tab! — but you can also think of them simply as fudge factors. There’s <em>some</em> chance that this word belongs to topic <em>Z</em> even if it is nowhere else associated with <em>Z</em>; the fudge factors keep that possibility open. The overall emphasis on probability in this technique, of course, is why it’s called <em>probabilistic</em> topic modeling.</p>
<p>Now, suppose that instead of having the problem mostly solved, we had only a wild guess which word belonged to which topic. We could still use the strategy outlined above to improve our guess, by making it more internally consistent. We could go through the collection, word by word, and reassign each word to a topic, guided by the formula above. As we do that, a) words will gradually become more common in topics where they are already common. And also, b) topics will become more common in documents where <em>they</em> are already common. Thus our model will gradually become more consistent as topics focus on specific words and documents. But it can’t ever become perfectly consistent, because words and documents don’t line up in one-to-one fashion. So the tendency for topics to concentrate on particular words and documents will eventually be limited by the actual, messy distribution of words across documents.</p>
<p>That’s how topic modeling works in practice. You assign words to topics randomly and then just keep improving the model, to make your guess more internally consistent, until the model reaches an equilibrium that is as consistent as the collection allows.</p>
<p><strong>What is it for?</strong> Topic modeling gives us a way to infer the latent structure behind a collection of documents. In principle, it could work at any scale, but I tend to think human beings are already pretty good at inferring the latent structure in (say) a single writer’s oeuvre. I suspect this technique becomes more useful as we move toward a scale that is too large to fit into human memory.</p>
<p>So far, most of the humanists who have explored topic modeling have been historians, and I suspect that historians and literary scholars will use this technique differently. Generally, historians have tried to assign a single label to each topic. So in mining the Richmond <em>Daily Dispatch,</em> Robert K. Nelson looks at <a href="http://dsl.richmond.edu/dispatch/Topics/view/1" target="_blank">a topic with words like “hundred,” “cotton,” “year,” “dollars,” and “money,”</a> and identifies it as TRADE — plausibly enough. Then he can graph the frequency of the topic as it varies over the print run of the newspaper.</p>
<p>As a literary scholar, I find that I learn more from ambiguous topics than I do from straightforwardly semantic ones. When I run into a topic like “sea,” “ship,” “boat,” “shore,” “vessel,” “water,” I shrug. Yes, some books discuss sea travel more than others do. But I’m more interested in topics like this:</p>
<p><a href="http://tedunderwood.files.wordpress.com/2012/04/thywhere.png"><img title="thywhere" src="http://tedunderwood.files.wordpress.com/2012/04/thywhere.png?w=640&amp;h=58" alt="" width="640" height="58" /></a><br />
You can tell by looking at the list of words that this is poetry, and plotting the volumes where the topic is prominent confirms the guess.</p>
<p><a href="http://tedunderwood.files.wordpress.com/2012/04/thywhereplot.png"><img title="ThyWherePlot" src="http://tedunderwood.files.wordpress.com/2012/04/thywhereplot.png?w=640&amp;h=640" alt="" width="640" height="640" /></a><br />
This topic is prominent in volumes of poetry from 1815 to 1835, especially in poetry by women, including Felicia Hemans, Letitia Landon, and Caroline Norton. Lord Byron is also well represented. It’s not really a “topic,” of course, because these words aren’t linked by a single referent. <a href="http://tedunderwood.wordpress.com/2012/04/01/what-kinds-of-topics-does-topic-modeling-actually-produce/" target="_blank">Rather it’s a discourse</a> or a kind of poetic rhetoric. In part it seems predictably Romantic (“deep bright wild eye”), but less colorful function words like “where” and “when” may reveal just as much about the rhetoric that binds this topic together.</p>
<p>A topic like this one is hard to interpret. But for a literary scholar, that’s a plus. I want this technique to point me toward something I don’t yet understand, and I almost never find that the results are too ambiguous to be useful. The problematic topics are the intuitive ones — the ones that are clearly about war, or seafaring, or trade. I can’t do much with those.</p>
<p>Now, I have to admit that there’s a bit of fine-tuning required up front, before I start getting “meaningfully ambiguous” results. In particular, a standard list of stopwords is rarely adequate. For instance, in topic-modeling fiction I find it useful to get rid of at least the most common personal pronouns, because otherwise the difference between 1st and 3rd person point-of-view becomes a dominant signal that crowds out other interesting phenomena. Personal names also need to be weeded out; otherwise you discover strong, boring connections between every book with a character named “Richard.” This sort of thing is very much a critical judgment call; it’s not a science.</p>
<p>I should also admit that, when you’re modeling fiction, the “author” signal can be very strong. I frequently discover topics that are dominated by a single author, and clearly reflect her unique idiom. This could be a feature or a bug, depending on your interests; I tend to view it as a bug, but I find that the author signal does diffuse more or less automatically as the collection expands.</p>
<p><a href="https://tedunderwood.files.wordpress.com/2012/04/austen.png"><img title="Austen" src="https://tedunderwood.files.wordpress.com/2012/04/austen.png?w=640&amp;h=640" alt="Topic prominently featuring Austen." width="640" height="640" /></a><br />
<strong>What are the limits of probabilistic topic modeling?</strong> <a href="http://tedunderwood.wordpress.com/2011/04/30/thinking-through-the-difference-between-topics/" target="_blank">I spent a long time resisting the allure of LDA,</a> because it seemed like a fragile and unnecessarily complicated technique. But I have convinced myself that it’s both effective and less complex than I thought. (Matt Jockers, Travis Brown, Neil Fraistat, and Scott Weingart also deserve credit for convincing me to try it.)</p>
<p>This isn’t to say that we need to use probabilistic techniques for everything we do. LDA and its relatives are valuable exploratory methods, but I’m not sure how much value they will have as evidence. For one thing, they require you to make a series of judgment calls that deeply shape the results you get (from choosing stopwords, to the number of topics produced, to the scope of the collection). The resulting model ends up being tailored in difficult-to-explain ways by a researcher’s preferences. Simpler techniques, like corpus comparison, can answer a question more transparently and persuasively, if the question is already well-formed. (In this sense, I think <a href="http://sappingattention.blogspot.com/2011/11/compare-and-contrast.html" target="_blank">Ben Schmidt is right to feel</a> that topic modeling wouldn’t be particularly useful for the kinds of comparative questions he likes to pose.)</p>
<p>Moreover, probabilistic techniques have an unholy thirst for memory and processing time. You have to create several different variables for <em>every single word</em> in the corpus. The models I’ve been running, with roughly 2,000 volumes, are getting near the edge of what can be done on an average desktop machine, and commonly take a day. To go any further with this, I’m going to have to beg for computing time. That’s not a problem for me here at Urbana-Champaign (you may recall that we invented HAL), but it will become a problem for humanists at other kinds of institutions.</p>
<p>Probabilistic methods are also less robust than, say, vector-space methods. When I started running LDA, I immediately discovered noise in my collection that had not previously been a problem. Running headers at the tops of pages, in particular, left traces: until I took out those headers, topics were suspiciously sensitive to the titles of volumes. But LDA is sensitive to noise, after all, because it is sensitive to everything else! On the whole, if you’re just fishing for interesting patterns in a large collection of documents, I think probabilistic techniques are the way to go.</p>
<p><strong>Where to go next</strong><br />
The standard implementation of LDA is <a href="http://mallet.cs.umass.edu/" target="_blank">the one in MALLET.</a> I haven’t used it yet, because I wanted to build my own version, to make sure I understood everything clearly. But MALLET is better. If you want a few examples of complete topic models on collections of 18/19c volumes, I’ve put some models, with R scripts to load them, <a href="https://github.com/tedunderwood/BrowseLDA" target="_blank">in my github folder.</a></p>
<p>If you want to understand the technique more deeply, the first thing to do is to read up on Bayesian statistics. In this post, I gloss over the Bayesian underpinnings of LDA because I think the implementation (using a strategy called Gibbs sampling, which is actually what I described above!) is intuitive enough without them. And this might be all you need! I doubt most humanists will need to go further. But if you do want to tinker with the algorithm, you’ll need to understand <a href="http://en.wikipedia.org/wiki/Bayesian_probability" target="_blank">Bayesian probability.</a></p>
<p>David Blei invented LDA, and writes well, so if you want to understand why this technique has “Dirichlet” in its name, his works are the next things to read. I recommend his <a href="http://www.cs.princeton.edu/%7Eblei/publications.html" target="_blank">Introduction to Probabilistic Topic Models.</a> It recently came out in <em>Communications of the ACM,</em> but I think you get a more readable version by going to his publication page (link above) and clicking the pdf link at the top of the page.</p>
<p>Probably the next place to go is <a href="http://people.cs.umass.edu/%7Emimno/publications.html" target="_blank">“Rethinking LDA: Why Priors Matter,”</a> a really thoughtful article by Hanna Wallach, David Mimno, and Andrew McCallum that explains the “hyperparameters” I glossed over in a more principled way.</p>
<p>Then there are a whole family of techniques related to LDA — Topics Over Time, Dynamic Topic Modeling, Hierarchical LDA, Pachinko Allocation — that one can explore rapidly enough by searching the web. In general, it’s a good idea to approach these skeptically. They all promise to do more than LDA does, but they also add additional assumptions to the model, and humanists are going to need to reflect carefully about which assumptions we actually want to make. I do think humanists will want to modify the LDA algorithm, but it’s probably something we’re going to have to do for ourselves; I’m not convinced that computer scientists understand our problems well enough to do this kind of fine-tuning.</p>
<p>&nbsp;</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/coling-2010-prospect' rel='bookmark' title='COLING 2010前瞻——规则与统计共舞，语言随计算齐飞'>COLING 2010前瞻——规则与统计共舞，语言随计算齐飞</a></li>
<li><a href='http://www.52nlp.cn/cfp-the-7th-young-researchers-roundtable-on-spoken-dialogue-systems' rel='bookmark' title='CFP: The 7th Young Researchers&#039; Roundtable on Spoken Dialogue Systems'>CFP: The 7th Young Researchers' Roundtable on Spoken Dialogue Systems</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%e6%8a%80%e6%9c%af%e6%b2%99%e9%be%99%e7%ac%ac%e4%b9%9d%e6%ac%a1%e6%b4%bb%e5%8a%a8' rel='bookmark' title='中文翻译技术沙龙第九次活动'>中文翻译技术沙龙第九次活动</a></li>
<li><a href='http://www.52nlp.cn/%e4%b8%93%e4%b8%9a%e8%80%81%e5%8f%8b%e7%97%9b%e6%89%b9%e7%ab%8b%e5%a7%94%e3%80%8a%e8%bf%b7%e6%80%9d%e3%80%8b%e7%b3%bb%e5%88%97%e6%90%85%e4%b9%b1nlp%e7%a7%a9%e5%ba%8f%ef%bc%8c%e7%ab%8b%e5%a7%94' rel='bookmark' title='专业老友痛批立委《迷思》系列搅乱NLP秩序，立委固执己见'>专业老友痛批立委《迷思》系列搅乱NLP秩序，立委固执己见</a></li>
<li><a href='http://www.52nlp.cn/acl-2012-accepted-long-papers-oral' rel='bookmark' title='ACL 2012 Accepted Long Papers (ORAL)'>ACL 2012 Accepted Long Papers (ORAL)</a></li>
<li><a href='http://www.52nlp.cn/acl-ijcnlp-2009-running-one' rel='bookmark' title='ACL-IJCNLP 2009会议进行时一'>ACL-IJCNLP 2009会议进行时一</a></li>
<li><a href='http://www.52nlp.cn/acl-ijcnlp-2009-running-two' rel='bookmark' title='ACL-IJCNLP 2009会议进行时二'>ACL-IJCNLP 2009会议进行时二</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/L10OEA6Puio" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/%e8%bd%ac%e8%bd%bd-topic-modeling-made-just-simple-enough/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/%e8%bd%ac%e8%bd%bd-topic-modeling-made-just-simple-enough</feedburner:origLink></item>
		<item>
		<title>分享：ConceptBro语义网浏览器</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/UAsUDO8AfgQ/%e5%88%86%e4%ba%ab%ef%bc%9aconceptbro%e8%af%ad%e4%b9%89%e7%bd%91%e6%b5%8f%e8%a7%88%e5%99%a8</link>
		<comments>http://www.52nlp.cn/%e5%88%86%e4%ba%ab%ef%bc%9aconceptbro%e8%af%ad%e4%b9%89%e7%bd%91%e6%b5%8f%e8%a7%88%e5%99%a8#comments</comments>
		<pubDate>Fri, 13 Apr 2012 09:33:08 +0000</pubDate>
		<dc:creator>qingshi</dc:creator>
				<category><![CDATA[自然语言处理]]></category>
		<category><![CDATA[语义网]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4366</guid>
		<description><![CDATA[一款开源软件，http://wuliang.github.com/assets/projects/ConceptBro/ 通用型的语义网浏览器，支持WordNet，WikiNet，JA-WordNet。由于提供了统一的数据库接口，所以有其他形式的语义网络格式都比较容易支持，只要为其写一个数据库接口（适配）。以下是数据库（策略）选择菜单。 使用方法等细节就不在这里多说了，项目站点都有。希望使用之后多提反馈意见。当然也欢迎大家根据自己的需求进行后续开发。另外一点，由于中文的WordNet似乎缺少完全开放的（比如台湾中科院的需要去信索取），所以就没有做这方面的工作，请大家理解。 &#160; 相关文章: abcNLP: AB-Natural Chinese Languange Processing 招生：Ph.D research assistant in machine learning and NLP recruiting Ph.D. students Itenyh版-用HMM做中文分词五：一个混合的分词器 LDC上免费的中文信息处理资源 Moses的一些新变化 自然语言处理公司巡礼六：Metaweb 语义网新闻一则：Google收购语义网公司Metaweb
相关文章:<ol>
<li><a href='http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing' rel='bookmark' title='abcNLP: AB-Natural Chinese Languange Processing'>abcNLP: AB-Natural Chinese Languange Processing</a></li>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/recruiting-ph-d-students' rel='bookmark' title='recruiting Ph.D. students'>recruiting Ph.D. students</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词五：一个混合的分词器'>Itenyh版-用HMM做中文分词五：一个混合的分词器</a></li>
<li><a href='http://www.52nlp.cn/free-resources-of-chinese-information-processing-in-ldc' rel='bookmark' title='LDC上免费的中文信息处理资源'>LDC上免费的中文信息处理资源</a></li>
<li><a href='http://www.52nlp.cn/moses%e7%9a%84%e4%b8%80%e4%ba%9b%e6%96%b0%e5%8f%98%e5%8c%96' rel='bookmark' title='Moses的一些新变化'>Moses的一些新变化</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-company-metaweb' rel='bookmark' title='自然语言处理公司巡礼六：Metaweb'>自然语言处理公司巡礼六：Metaweb</a></li>
<li><a href='http://www.52nlp.cn/%e8%af%ad%e4%b9%89%e7%bd%91%e6%96%b0%e9%97%bb%e4%b8%80%e5%88%99-google%e6%94%b6%e8%b4%ad%e8%af%ad%e4%b9%89%e7%bd%91%e5%85%ac%e5%8f%b8metaweb' rel='bookmark' title='语义网新闻一则：Google收购语义网公司Metaweb'>语义网新闻一则：Google收购语义网公司Metaweb</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>一款开源软件，<a href="http://wuliang.github.com/assets/projects/ConceptBro/">http://wuliang.github.com/assets/projects/ConceptBro/</a></p>
<p><img src="http://wuliang.github.com/assets/projects/ConceptBro/Screensnap-5.png" alt="" /></p>
<p>通用型的语义网浏览器，支持WordNet，WikiNet，JA-WordNet。由于提供了统一的数据库接口，所以有其他形式的语义网络格式都比较容易支持，只要为其写一个数据库接口（适配）。以下是数据库（策略）选择菜单。</p>
<p><img src="http://wuliang.github.com/assets/projects/ConceptBro/Screensnap-6.png" alt="" /></p>
<p>使用方法等细节就不在这里多说了，项目站点都有。希望使用之后多提反馈意见。当然也欢迎大家根据自己的需求进行后续开发。另外一点，由于中文的WordNet似乎缺少完全开放的（比如台湾中科院的需要去信索取），所以就没有做这方面的工作，请大家理解。</p>
<p>&nbsp;</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing' rel='bookmark' title='abcNLP: AB-Natural Chinese Languange Processing'>abcNLP: AB-Natural Chinese Languange Processing</a></li>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/recruiting-ph-d-students' rel='bookmark' title='recruiting Ph.D. students'>recruiting Ph.D. students</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词五：一个混合的分词器'>Itenyh版-用HMM做中文分词五：一个混合的分词器</a></li>
<li><a href='http://www.52nlp.cn/free-resources-of-chinese-information-processing-in-ldc' rel='bookmark' title='LDC上免费的中文信息处理资源'>LDC上免费的中文信息处理资源</a></li>
<li><a href='http://www.52nlp.cn/moses%e7%9a%84%e4%b8%80%e4%ba%9b%e6%96%b0%e5%8f%98%e5%8c%96' rel='bookmark' title='Moses的一些新变化'>Moses的一些新变化</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-company-metaweb' rel='bookmark' title='自然语言处理公司巡礼六：Metaweb'>自然语言处理公司巡礼六：Metaweb</a></li>
<li><a href='http://www.52nlp.cn/%e8%af%ad%e4%b9%89%e7%bd%91%e6%96%b0%e9%97%bb%e4%b8%80%e5%88%99-google%e6%94%b6%e8%b4%ad%e8%af%ad%e4%b9%89%e7%bd%91%e5%85%ac%e5%8f%b8metaweb' rel='bookmark' title='语义网新闻一则：Google收购语义网公司Metaweb'>语义网新闻一则：Google收购语义网公司Metaweb</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/UAsUDO8AfgQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/%e5%88%86%e4%ba%ab%ef%bc%9aconceptbro%e8%af%ad%e4%b9%89%e7%bd%91%e6%b5%8f%e8%a7%88%e5%99%a8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/%e5%88%86%e4%ba%ab%ef%bc%9aconceptbro%e8%af%ad%e4%b9%89%e7%bd%91%e6%b5%8f%e8%a7%88%e5%99%a8</feedburner:origLink></item>
		<item>
		<title>Itenyh版-用HMM做中文分词五：一个混合的分词器</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/FwwkgS1c0bw/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8</link>
		<comments>http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8#comments</comments>
		<pubDate>Mon, 09 Apr 2012 02:35:37 +0000</pubDate>
		<dc:creator>itenyh</dc:creator>
				<category><![CDATA[中文分词]]></category>
		<category><![CDATA[自然语言处理]]></category>
		<category><![CDATA[隐马尔科夫模型]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4345</guid>
		<description><![CDATA[        在上一节中，我们看到了HMM分词器的优势在于它的灵活性，能够联系上文情况作出是否分词的判断，但是过于灵活又会出现一些低级的分词错误。一种扬长避短的想法是使用词典限定HMM的分词。具体的做法是，用基于词典的分词方法分出N种结果，然后用HMM挑出最有可能的分词结果。        介绍一下分词使用的词典，在《中文分词入门之资源》有提到：         Mandarin.dic                             分词词典，约40000条词汇         对于一段文本，找出所有可能的切分结果叫做全切分，全切分可以保证切分结果集对正确切分结果100%的召回率，换句话说全切分中一定包含正确结果（在不包含未登录词的前提之下）。长度为n的句子，最大全切分数量可以达到2`(n-1)个，因此全切分计算量会随着句子长度增加急剧上升。举例，句子“研究生命起源”的全切分如下： 研/究/生/命 研/究/生命 研究/生/命 研究/生命 研究生/命 共有5个切分方案，其中倒数第二个是正确切分。下面讲一下我对句子进行全切分用的具体算法。         如上图，考虑构建一颗多叉树，其中每一条从root到叶子节点的路径均为一种分词结果，所有root到叶子节点的路径就是全切分的结果。树的建立方法是使用的递归：         对句子进行正向词典匹配，结果为：         研            对剩余句子：究生命    进行词典匹配         研究        对剩余句子：生命        进行词典匹配         研究生    对剩余句子：命            进行词典匹配         全切分结果准备就绪，下面的问题是如何从备选分词中选出最佳分词结果，因为备选结果只有有限的数量，因此可以使用枚举算法求最佳解：             &#8230; <a href="http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e5%9b%9b%ef%bc%9aa-pure-hmm-%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词四：A Pure-HMM 分词器'>Itenyh版-用HMM做中文分词四：A Pure-HMM 分词器</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%89%ef%bc%9a%e5%89%8d%e5%90%91%e7%ae%97%e6%b3%95%e5%92%8cviterbi%e7%ae%97%e6%b3%95%e7%9a%84%e5%bc%80%e9%94%80' rel='bookmark' title='Itenyh版-用HMM做中文分词三：前向算法和Viterbi算法的开销'>Itenyh版-用HMM做中文分词三：前向算法和Viterbi算法的开销</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%80%ef%bc%9a%e6%a8%a1%e5%9e%8b%e5%87%86%e5%a4%87' rel='bookmark' title='Itenyh版-用HMM做中文分词二：模型准备'>Itenyh版-用HMM做中文分词二：模型准备</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%80%ef%bc%9a%e5%ba%8f' rel='bookmark' title='Itenyh版-用HMM做中文分词一：序'>Itenyh版-用HMM做中文分词一：序</a></li>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e9%81%933-crf-%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e8%a7%a3%e7%a0%81%e8%bf%87%e7%a8%8b%e7%90%86%e8%a7%a3' rel='bookmark' title='初学者报道(3)  CRF 中文分词解码过程理解'>初学者报道(3)  CRF 中文分词解码过程理解</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-5' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注5'>HMM在自然语言处理中的应用一：词性标注5</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-3' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注3'>HMM在自然语言处理中的应用一：词性标注3</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-2' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注2'>HMM在自然语言处理中的应用一：词性标注2</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-fourth-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第四部分）'>MIT自然语言处理第四讲：标注（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-second-lesson-word-counting-fourth-part' rel='bookmark' title='MIT自然语言处理第二讲：单词计数（第四部分）'>MIT自然语言处理第二讲：单词计数（第四部分）</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="left">        在上一节中，我们看到了HMM分词器的优势在于它的灵活性，能够联系上文情况作出是否分词的判断，但是过于灵活又会出现一些低级的分词错误。一种扬长避短的想法是使用词典限定HMM的分词。具体的做法是，用基于词典的分词方法分出N种结果，然后用HMM挑出最有可能的分词结果。</p>
<p align="left">       介绍一下分词使用的词典，在《<a href="http://www.52nlp.cn/%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D%E5%85%A5%E9%97%A8%E4%B9%8B%E8%B5%84%E6%BA%90">中文分词入门之资源</a>》有提到：</p>
<p align="left">        <a href="http://www.ldc.upenn.edu/Projects/Chinese/seg.zip">Mandarin.dic</a>                             分词词典，约40000条词汇</p>
<p align="left">        对于一段文本，找出所有可能的切分结果叫做全切分，全切分可以保证切分结果集对正确切分结果100%的召回率，换句话说全切分中一定包含正确结果（在不包含未登录词的前提之下）。长度为n的句子，最大全切分数量可以达到2`(n-1)个，因此全切分计算量会随着句子长度增加急剧上升。举例，句子“研究生命起源”的全切分如下：</p>
<p align="left">研/究/生/命</p>
<p align="left">研/究/生命</p>
<p align="left">研究/生/命</p>
<p>研究/生命</p>
<p>研究生/命</p>
<p>共有5个切分方案，其中倒数第二个是正确切分。下面讲一下我对句子进行全切分用的具体算法。</p>
<p align="left"><a href="http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8/%e6%9c%aa%e5%91%bd%e5%90%8d" rel="attachment wp-att-4346"><img class="aligncenter size-full wp-image-4346" src="http://www.52nlp.cn/wp-content/uploads/2012/04/未命名.jpg" alt="" width="338" height="258" /></a>        如上图，考虑构建一颗多叉树，其中每一条从root到叶子节点的路径均为一种分词结果，所有root到叶子节点的路径就是全切分的结果。树的建立方法是使用的递归：</p>
<p align="left">        对句子进行正向词典匹配，结果为：</p>
<p align="left">        研            对剩余句子：究生命    进行词典匹配</p>
<p align="left">        研究        对剩余句子：生命        进行词典匹配</p>
<p align="left">        研究生    对剩余句子：命            进行词典匹配</p>
<p align="left">        全切分结果准备就绪，下面的问题是如何从备选分词中选出最佳分词结果，因为备选结果只有有限的数量，因此可以使用枚举算法求最佳解：</p>
<p>                                                          ArgmaxC,O  P(C|O)</p>
<p>解法在第2集中已经提到，等价于求：</p>
<p style="text-align: center">ArgmaxC,O  P(O|C)P(C)</p>
<p align="left">       为了避免计算溢出（小数位数太多计算机无法表示），我们改为求：</p>
<p align="left">                                                          ArgminC,O  -lnP(O|C) – lnP(C)</p>
<p align="left">        对于句子“研究生命”，分词结果如下：</p>
<p align="left">        研/究/生/命:44.24491284128293</p>
<p align="left">        研/究/生命:37.12604972173189</p>
<p align="left">        研究/生/命:33.59480382540995</p>
<p align="left">        研究/生命:26.49050292705271</p>
<p align="left">        研究生/命:32.15705471620734</p>
<p align="left">        其中“研究/生命”拥有最低值，被选为最优解。再举一些有意思的分词结果：</p>
<p align="left">        研究生/研究/生活</p>
<p align="left">        结合/成/分子</p>
<p align="left">        他/说/的/确实/在/理</p>
<p align="left">        可以看出这种混合分词器能够灵活的掌握字符间的分和，消除一些歧义分词。</p>
<p>        下面是我对几种分词方法的实验结果，同时使用了ICTCLAS2011作为一个权威的分词效果比对，其中ICTCLAS2011使用的是它自带的词典，其他分词方法使用的词典是<a href="http://www.ldc.upenn.edu/Projects/Chinese/seg.zip">Mandarin.dic</a>：</p>
<p style="text-align: center" align="left">                                      每秒分词     P         R            F</p>
<p style="text-align: center" align="left">普通最大词匹配          5482401      0.76   0.85      0.80</p>
<p style="text-align: center" align="left">扩展的最大匹配          1118591      0.79   0.75      0.77</p>
<p style="text-align: center" align="left">普通的Markov           1590173      0.76   0.72      0.74</p>
<p style="text-align: center" align="left">混合的Markov           46818        0.73   0.84      0.78</p>
<p style="text-align: center" align="left">ICTCLAS2011           942973       0.92   0.92     0.92</p>
<p align="left">          可以看出ICTCLAS果然是名不虚传，相对于混合的Markov，ICTCLAS使用的是层叠式的HMM模型，可以很好的识别出未登录词；其次ICTCLAS使用了基于N-最短路径的切分，对计算效率也有很大的提高。</p>
<p align="left">          PS：因为之前没有想过要分享分词的程序，所以写得比较混乱，最近也很忙，我会尽快整理发上来的。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e5%9b%9b%ef%bc%9aa-pure-hmm-%e5%88%86%e8%af%8d%e5%99%a8' rel='bookmark' title='Itenyh版-用HMM做中文分词四：A Pure-HMM 分词器'>Itenyh版-用HMM做中文分词四：A Pure-HMM 分词器</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%89%ef%bc%9a%e5%89%8d%e5%90%91%e7%ae%97%e6%b3%95%e5%92%8cviterbi%e7%ae%97%e6%b3%95%e7%9a%84%e5%bc%80%e9%94%80' rel='bookmark' title='Itenyh版-用HMM做中文分词三：前向算法和Viterbi算法的开销'>Itenyh版-用HMM做中文分词三：前向算法和Viterbi算法的开销</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%80%ef%bc%9a%e6%a8%a1%e5%9e%8b%e5%87%86%e5%a4%87' rel='bookmark' title='Itenyh版-用HMM做中文分词二：模型准备'>Itenyh版-用HMM做中文分词二：模型准备</a></li>
<li><a href='http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%b8%80%ef%bc%9a%e5%ba%8f' rel='bookmark' title='Itenyh版-用HMM做中文分词一：序'>Itenyh版-用HMM做中文分词一：序</a></li>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e9%81%933-crf-%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e8%a7%a3%e7%a0%81%e8%bf%87%e7%a8%8b%e7%90%86%e8%a7%a3' rel='bookmark' title='初学者报道(3)  CRF 中文分词解码过程理解'>初学者报道(3)  CRF 中文分词解码过程理解</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-5' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注5'>HMM在自然语言处理中的应用一：词性标注5</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-3' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注3'>HMM在自然语言处理中的应用一：词性标注3</a></li>
<li><a href='http://www.52nlp.cn/hmm-application-in-natural-language-processing-one-part-of-speech-tagging-2' rel='bookmark' title='HMM在自然语言处理中的应用一：词性标注2'>HMM在自然语言处理中的应用一：词性标注2</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-fourth-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第四部分）'>MIT自然语言处理第四讲：标注（第四部分）</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-second-lesson-word-counting-fourth-part' rel='bookmark' title='MIT自然语言处理第二讲：单词计数（第四部分）'>MIT自然语言处理第二讲：单词计数（第四部分）</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/FwwkgS1c0bw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/itenyh%e7%89%88-%e7%94%a8hmm%e5%81%9a%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e4%ba%94%ef%bc%9a%e4%b8%80%e4%b8%aa%e6%b7%b7%e5%90%88%e7%9a%84%e5%88%86%e8%af%8d%e5%99%a8</feedburner:origLink></item>
		<item>
		<title>abcNLP: AB-Natural Chinese Languange Processing</title>
		<link>http://feedproxy.google.com/~r/52nlp/~3/v2k62KFBjxI/abcnlp-ab-natural-chinese-languange-processing</link>
		<comments>http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:42:00 +0000</pubDate>
		<dc:creator>qingshi</dc:creator>
				<category><![CDATA[自然语言处理]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=4332</guid>
		<description><![CDATA[abcNLP Readme Introduce abcNLP AB-Natural Chinese Languange Processing, The movement of C makes it ab-natural. Thanks to censorship of internet, people oftern meet trouble to express themselves freely. Usually the SYSTEM will filter contents by (keywords) pattern matching. If we &#8230; <a href="http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e5%88%b0-%e5%ae%9e%e7%8e%b0%e4%ba%86%e4%b8%80%e4%b8%aa%e6%9c%80%e5%a4%a7%e5%8c%b9%e9%85%8d%e7%9a%84%e5%88%86%e8%af%8d%e7%ae%97%e6%b3%95' rel='bookmark' title='初学者报到: 实现了一个最大匹配的分词算法'>初学者报到: 实现了一个最大匹配的分词算法</a></li>
<li><a href='http://www.52nlp.cn/moses-basic-framework' rel='bookmark' title='Moses基本框架'>Moses基本框架</a></li>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e9%81%93%ef%bc%882%ef%bc%89%ef%bc%9a%e5%ae%9e%e7%8e%b0-1-gram%e5%88%86%e8%af%8d%e7%ae%97%e6%b3%95' rel='bookmark' title='初学者报道（2）：实现 1-gram分词算法'>初学者报道（2）：实现 1-gram分词算法</a></li>
<li><a href='http://www.52nlp.cn/the-character-based-tagging-method-of-chinese-word-segmentation' rel='bookmark' title='基于字标注的中文分词方法'>基于字标注的中文分词方法</a></li>
<li><a href='http://www.52nlp.cn/%e5%ae%89%e8%a3%85srilm%e7%9a%84%e4%b8%80%e7%82%b9%e6%96%b0%e5%8f%98%e5%8c%96' rel='bookmark' title='安装Srilm的一点新变化'>安装Srilm的一点新变化</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d8' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词8'>Beautiful Data-统计语言模型的应用三：分词8</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-second-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第二部分）'>MIT自然语言处理第四讲：标注（第二部分）</a></li>
<li><a href='http://www.52nlp.cn/crazy-word-beautiful-word-clouds' rel='bookmark' title='单词也疯狂——漂亮的“单词云”'>单词也疯狂——漂亮的“单词云”</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词6'>Beautiful Data-统计语言模型的应用三：分词6</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-first-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第一部分）'>MIT自然语言处理第四讲：标注（第一部分）</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>abcNLP Readme</p>
<h1>Introduce</h1>
<p>abcNLP</p>
<p>AB-Natural Chinese Languange Processing, The movement of C makes it ab-natural.</p>
<p>Thanks to censorship of internet, people oftern meet trouble to express themselves freely. Usually the SYSTEM will filter contents by (keywords) pattern matching. If we can make the language hard understood to SYSTEM, but not to human, we make the expression “Immune 2 Censorship” (at least, to some extent)!<br />
<span id="more-4332"></span></p>
<h1>Requirements</h1>
<ul>
<li>develop: CJKLIB, sqlite3</li>
<li>use: sqlite3</li>
</ul>
<h1>Usage</h1>
<ul>
<li>for example :</li>
</ul>
<pre>   abc = abcChineseChar()
   for word in abc.getHxWords(u'茉莉花',  maxnum=5):
       print word</pre>
<ul>
<li>output:</li>
</ul>
<pre> 苿峲芘
 苿峲芼
 苿萂芘
 炗峲芘
 苿峲芭</pre>
<p>(~ use tempory db, need to refine ~)</p>
<ul>
<li>for example :</li>
<li>output :</li>
<ul>
<li>ouput of 锦</li>
</ul>
</ul>
<pre>   abc = abcChineseChar()
   for char in abc.getHxCharacters(u'锦'):
       print char</pre>
<pre>   jǐn
   钅帛
   仅
   尽
   錦
   馑</pre>
<ul>
<li>ouput of 陈水扁:</li>
</ul>
<pre>   abc = abcChineseChar()
   for word in abc.getHxWords(u'陈水扁',  maxnum=15):
       print word</pre>
<pre>   &lt;chén&gt;&lt;shuǐ&gt;&lt;biān&gt;
   &lt;阝东&gt;&lt;shuǐ&gt;&lt;biān&gt;
   &lt;chén&gt;&lt;shuǐ&gt;边
   &lt;阝东&gt;&lt;shuǐ&gt;边
    尘&lt;shuǐ&gt;&lt;biān&gt;
    臣&lt;shuǐ&gt;&lt;biān&gt;
   &lt;chén&gt;&lt;shuǐ&gt;便
   &lt;chén&gt;&lt;shuǐ&gt;碥
    &lt;chén&gt;&lt;shuǐ&gt;艑
   &lt;chén&gt;氵&lt;biān&gt;
    &lt;阝东&gt;&lt;shuǐ&gt;便
    &lt;阝东&gt;&lt;shuǐ&gt;碥
    &lt;阝东&gt;&lt;shuǐ&gt;艑
    &lt;阝东&gt;氵&lt;biān&gt;
    尘&lt;shuǐ&gt;边</pre>
<p>(~ use db version 1 ~)</p>
<h1>Develope / Design</h1>
<h2>Methods to Immune 2 Censorship</h2>
<h3>Semantical Substitutes</h3>
<p>Metaphor related methods. Thi is not used in this project.</p>
<h3>Use variants of the Character</h3>
<p>The variant of a character is alao a valid character. It can be seen as another shape (form) of original one. But some of forms are rare used nowdays.</p>
<pre> 㒲 --&gt; 財
 㒲 --&gt; 才
 㒲 --&gt; 财
 㒲 --&gt; 纔
 㒷 --&gt; 興
 㒷 --&gt; 兴
 㓁 --&gt; 网
 㓁 --&gt; 網
 㓁 --&gt; 罔</pre>
<h3>Use Character with same reading(Pinyin)</h3>
<p>In the following list, value in brackets is score for the replacement. More small, more better.</p>
<pre> 㐲 --&gt; dài (0) * Pinyin is a special type
 㐲 --&gt; 大 (3)
 㐲 --&gt; 代 (5)
 㐲 --&gt; 黱 (22)</pre>
<pre> 㐳 --&gt; wù (0)
 㐳 --&gt; 兀 (3)
 㐳 --&gt; 乌 (4)
 㐳 --&gt; 鼿 (17)</pre>
<h3>Split Character to two or three parts</h3>
<p>After split character, each of its part can be further replaced with its similar character, which has ending mark of “1” in the following list.</p>
<pre> 川 --&gt; &lt;丿丨丨&gt; 0
 巧 --&gt; &lt;工丂&gt; 0
 垛 --&gt; &lt;土朶&gt; 1
 垜 --&gt; &lt;土朵&gt; 1
 ⽻ --&gt; &lt;習習&gt; 1
 ⾽ --&gt; &lt;镸三&gt; 1
 䜌 --&gt; &lt;⺯讠⺯&gt; 1
 丬 --&gt; &lt;氷丨&gt; 1
 乢 --&gt; &lt;山隠&gt; 1
 乣 --&gt; &lt;庅乚&gt; 1
 乨 --&gt; &lt;枱乚&gt; 1
 乩 --&gt; &lt;佔乚&gt; 1
 ⽻ --&gt; &lt;习习&gt; 0
 ⾽ --&gt; &lt;镸彡&gt; 0
 丬 --&gt; &lt;冫丨&gt; 0
 乢 --&gt; &lt;山乚&gt; 0
 乣 --&gt; &lt;幺乚&gt; 0
 乨 --&gt; &lt;台乚&gt; 0
 乩 --&gt; &lt;占乚&gt; 0
 亿 --&gt; &lt;亻乙&gt; 0
 什 --&gt; &lt;亻十&gt; 0
 仁 --&gt; &lt;亻二&gt; 0
 亿 --&gt; &lt;人乙&gt; 1
 什 --&gt; &lt;人十&gt; 1
 仁 --&gt; &lt;人二&gt; 1
 仂 --&gt; &lt;人力&gt; 1
 仃 --&gt; &lt;人丁&gt; 1
 仅 --&gt; &lt;人又&gt; 1
 仆 --&gt; &lt;人卜&gt; 1
 仇 --&gt; &lt;人九&gt; 1</pre>
<h3>Choose a character looks like the origion. ( AI ?)</h3>
<p>The score smaller is the better.</p>
<pre> ⺡ --&gt; ⺍ (1)
 ⺡ --&gt; 乊 (3)
 ⺡ --&gt; 丬 (3)
 ⺡ --&gt; 习 (4)
 ⺡ --&gt; 乥 (8)
 ⺆ --&gt; ⼌ (2)
 ⺆ --&gt; ⼓ (3)
 ⺆ --&gt; ⼏ (4)
 ⺆ --&gt; 九 (4)
 丨 --&gt; ⼁ (0)
 丨 --&gt; ⼃ (2)
 丨 --&gt; 丿 (2)
 丨 --&gt; ⼅ (2)</pre>
<p>This is the most important part of the project. After the module is refined, more examples will be added.</p>
<div>Homepage on <a title="Github" href="https://github.com/wuliang/abcNLP" target="_blank">Github</a></div>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e5%88%b0-%e5%ae%9e%e7%8e%b0%e4%ba%86%e4%b8%80%e4%b8%aa%e6%9c%80%e5%a4%a7%e5%8c%b9%e9%85%8d%e7%9a%84%e5%88%86%e8%af%8d%e7%ae%97%e6%b3%95' rel='bookmark' title='初学者报到: 实现了一个最大匹配的分词算法'>初学者报到: 实现了一个最大匹配的分词算法</a></li>
<li><a href='http://www.52nlp.cn/moses-basic-framework' rel='bookmark' title='Moses基本框架'>Moses基本框架</a></li>
<li><a href='http://www.52nlp.cn/%e5%88%9d%e5%ad%a6%e8%80%85%e6%8a%a5%e9%81%93%ef%bc%882%ef%bc%89%ef%bc%9a%e5%ae%9e%e7%8e%b0-1-gram%e5%88%86%e8%af%8d%e7%ae%97%e6%b3%95' rel='bookmark' title='初学者报道（2）：实现 1-gram分词算法'>初学者报道（2）：实现 1-gram分词算法</a></li>
<li><a href='http://www.52nlp.cn/the-character-based-tagging-method-of-chinese-word-segmentation' rel='bookmark' title='基于字标注的中文分词方法'>基于字标注的中文分词方法</a></li>
<li><a href='http://www.52nlp.cn/%e5%ae%89%e8%a3%85srilm%e7%9a%84%e4%b8%80%e7%82%b9%e6%96%b0%e5%8f%98%e5%8c%96' rel='bookmark' title='安装Srilm的一点新变化'>安装Srilm的一点新变化</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d8' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词8'>Beautiful Data-统计语言模型的应用三：分词8</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-second-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第二部分）'>MIT自然语言处理第四讲：标注（第二部分）</a></li>
<li><a href='http://www.52nlp.cn/crazy-word-beautiful-word-clouds' rel='bookmark' title='单词也疯狂——漂亮的“单词云”'>单词也疯狂——漂亮的“单词云”</a></li>
<li><a href='http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6' rel='bookmark' title='Beautiful Data-统计语言模型的应用三：分词6'>Beautiful Data-统计语言模型的应用三：分词6</a></li>
<li><a href='http://www.52nlp.cn/mit-nlp-fourth-lesson-tagging-first-part' rel='bookmark' title='MIT自然语言处理第四讲：标注（第一部分）'>MIT自然语言处理第四讲：标注（第一部分）</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/52nlp/~4/v2k62KFBjxI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.52nlp.cn/abcnlp-ab-natural-chinese-languange-processing</feedburner:origLink></item>
	</channel>
</rss>

