2013年6月25日

摘要: 仅列出核心代码: 1.estimateGuassian.m mu = mean(X)'; X2 = (X - ones(m, 1)*mu').^2; sigma2 = mean(X2); 2.selectThreshold.m cvPredictions = (pval < epsilon); tp = sum((... 阅读全文
posted @ 2013-06-25 00:16 Andnot 阅读(536) 评论(0) 推荐(0) 编辑

2013年6月18日

摘要: 仅列出核心代码: 1.findClosestCentroids.m m = size(X, 1); len = zeros(K, 1); for i = 1:m for j = 1:K len(j) = norm(X(i, :) - centroids(j, :))^2; en... 阅读全文
posted @ 2013-06-18 12:16 Andnot 阅读(797) 评论(0) 推荐(0) 编辑

2013年6月11日

摘要: 仅列出核心代码: 1.gaussianKernel.m sim = exp(-sum((x1 - x2).^2) /(2*sigma^2)); 2.dataset3Params.m TD = [0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30]; pre_err = zeros(length(TD)); for i = 1... 阅读全文
posted @ 2013-06-11 13:29 Andnot 阅读(1233) 评论(0) 推荐(0) 编辑

2013年6月3日

摘要: 仅列出核心代码: 1.linearRegCostFunction.m h = X * theta; J = (X * theta - y).' * (X * theta - y) / (2*m)... +(lambda/(2*m)) * sum(theta(2:end).^2); grad = grad(:); gra... 阅读全文
posted @ 2013-06-03 13:48 Andnot 阅读(1378) 评论(0) 推荐(0) 编辑

2013年5月27日

摘要: 仅列出核心代码: 1.sigmoidGradient.m h = 1.0 ./ (1.0 + exp(-z)); g = h.*(1 - h); 2.randInitializeWeights.m epsilon_init = 0.12; W = rand(L_out, 1 + L_in)*2*epsilon_init - epsilon_init... 阅读全文
posted @ 2013-05-27 17:23 Andnot 阅读(888) 评论(0) 推荐(0) 编辑

2013年5月20日

摘要: 仅列出核心代码: 1.lrCostFunction.m h = sigmoid(X * theta); % h_theta(X) : m*1 % Cost func J = (-log(h.')*y - log(ones(1, m) - h.')*(ones(m, 1) - y)) / m ... +(lambda/(2*... 阅读全文
posted @ 2013-05-20 14:56 Andnot 阅读(829) 评论(0) 推荐(0) 编辑
摘要: 仅列出核心代码: 1.plotData.m ind1 = find(y==1); ind0 = find(y==0); plot(X(ind1, 1), X(ind1, 2), 'k+','LineWidth', 2, 'MarkerSize', 7); plot(X(ind0, 1), X(ind0, 2), 'ko', 'MarkerFaceCo... 阅读全文
posted @ 2013-05-20 14:15 Andnot 阅读(476) 评论(0) 推荐(0) 编辑

2013年5月9日

摘要: 仅列出核心代码: 1.computeCost J = sum((X*theta-y).^2)/(2*m); 2.gradientDescent theta = theta - (1/m)*alpha*(X.'*(X*theta-y)); 3.featureNormalize mu = mean(X); sigma = std(X); ... 阅读全文
posted @ 2013-05-09 23:37 Andnot 阅读(728) 评论(0) 推荐(0) 编辑

2013年5月6日

摘要: one thing is certain: the workers were hard to feel a sense of accomplishment or happiness. Dan Ariely etc. (D Ariely, 2008) and Michael Norton etc. (M Norton, 2012), made a statement of a unanimous conclusion in their papers, which is: "a sense of identity" is important to everyone. This sense of identity comes from both the completion of the work and the affirmation of the results of the work from others. As "IKEA Effect" indicated, a doubly cherish would be put on the fruit of the task which 阅读全文
posted @ 2013-05-06 22:15 Andnot 阅读(285) 评论(0) 推荐(0) 编辑

2013年4月3日

摘要: 本文介绍一种如何在博文中显示非图片形式数学公式的方法。只需在博客后台设置「页首Html代码」项中添加以下代码,即可调用MathJax的CDN在你的博客中显示$\LaTeX$公式,并且这样产生的公式可以任意缩放而无失真。 1 <script type="text/x-mathjax-config"> 2 MathJax.Hub.Config({ 3 tex2jax: { 4 inlineMath: [ 5 ['$', '$'], 6 ['\\(', '\\)'] 7 ... 阅读全文
posted @ 2013-04-03 16:04 Andnot 阅读(4097) 评论(5) 推荐(0) 编辑

导航