Artificial intelligence
cc509a
这个作者很懒,什么都没留下…
展开
-
机器学习作业之 Linear Regression with Multiple Variables (Week 2)
function J = computeCost(X, y, theta)%COMPUTECOST Compute cost for linear regression% J = COMPUTECOST(X, y, theta) computes the cost of using theta as the% parameter for linear regression to fi原创 2014-11-19 22:55:58 · 1266 阅读 · 0 评论 -
Mac下Octave 调用 gunplot的时set terminal aqua enhanced title "Figure 1" font "*,6"的解決辦法
最近在上吳恩達老師的《machine'le原创 2014-11-19 22:43:51 · 3482 阅读 · 0 评论 -
机器学习作业 之 logistic regression(programming exercise week 3 )
1 plotDtaepos = find(y==1);neg =find(y == 0); 15 h1=plot(X(pos,1),X(pos,2),'*','MarkerFaceColor','b'); 16 h2=plot(X(neg,1),X(neg,2),'o','MarkerfaceColor','r');2 sigmoid原创 2014-11-23 00:11:12 · 947 阅读 · 1 评论 -
神經網絡實現步驟
1,隨機初始化權值,一般初始化為很小的值(接近于0)2,執行正向傳播算法,對每一個X(i)計算出對應的H(Xi)3,通過代碼實現costfunction 4,實現反向傳播算法5,用梯度檢測算法計算偏導數,并和之前用的反向傳播計算出的結果比較,確保兩個結果比較接近6,運動優化算法最小化costfunction原创 2014-12-18 12:30:31 · 682 阅读 · 0 评论 -
机器学习作业之 Multi-class Classification and Neural Networks(week4)
1Regularied Logistic Regressionh = sigmoid(X*theta);J = sum((-y).*log(h) - (1-y).*log(1-h))./m +(lambda) * sum(theta(2:end).^2)/(2*m);grad = X'*(h-y)/m;temp = grad (1); grad = grad + (lambda/m原创 2014-12-04 15:51:58 · 2417 阅读 · 0 评论 -
A*算法
适应性f:fitness 目标g:goal 启发式h:heuristicg为从起始节点到该节点的的代价,h为从该节点到目标节点的估计代价f为g和h的和,f代表队这条对这条路线的猜测和估计,越小越好另外A*保持着两个表:open和closed表,open代表未考察的节点,closed代表以考查的节点,伪代码:1 另P=起始节点2把 f,g和h的赋给p3 将p原创 2015-04-12 12:16:00 · 585 阅读 · 0 评论