1.findClosestCentroids function idx = findClosestCentroids(X, centroids) %FINDCLOSESTCENTROIDS computes the centroid memberships for every example % idx = FINDCLOSESTCENTROIDS (X, centroids) returns the closest centroids % in idx for a dataset X wher…
1.Gaussian Kernel function sim = gaussianKernel(x1, x2, sigma) %RBFKERNEL returns a radial basis function kernel between x1 and x2 % sim = gaussianKernel(x1, x2) returns a gaussian kernel between x1 and x2 % and returns the value in sim % Ensure that…
1.linearRegCostFunction: function [J, grad] = linearRegCostFunction(X, y, theta, lambda) %LINEARREGCOSTFUNCTION Compute cost and gradient for regularized linear %regression with multiple variables % [J, grad] = LINEARREGCOSTFUNCTION(X, y, theta, lamb…
1.Sigmoid Gradient function g = sigmoidGradient(z) %SIGMOIDGRADIENT returns the gradient of the sigmoid function %evaluated at z % g = SIGMOIDGRADIENT(z) computes the gradient of the sigmoid function % evaluated at z. This should work regardless if z…
1.lrCostFunction: 和第三周的那个一样的: function [J, grad] = lrCostFunction(theta, X, y, lambda) %LRCOSTFUNCTION Compute cost and gradient for logistic regression with %regularization % J = LRCOSTFUNCTION(theta, X, y, lambda) computes the cost of using % theta…
做题记录 风影影,景色明明,淡淡云雾中,小鸟轻灵. c++的文件操作已经好玩起来了,不过掌握好控制结构显得更为重要了. 我这也不做啥题目分析了,直接就题干-代码. 总结--留着自己看 1. 流是指从一个位置向另一个位置传输的一连串数据的集合. 2. 标准输入流一一从标准输入设备(键盘)流向程序的数据.,一般用cin流对象进行输入 3. ">>",这个符号是输入ios类的符号重载函数.以回车和空格作为分隔符.就是说中间的空格符号无法获得. 4. 着重介绍:get 和 getl…
问题描述: 做吴恩达深度学习第4课第3周编程作业时导入PIL包报错. 我的环境: 已经安装了Tensorflow GPU 版本 Python3 Anaconda 解决办法: 安装pillow模块,而不是PIL模块.原因是PIL模块不支持python3, 只支持python2. Python3下应安装pillow模块代, 替PIL即可. 下面内容是根据自己环境的记录: Ubuntu下我用Anaconda已经搭建好了Tensorflow GPU环境,环境名字是tf. 命令行下输入(下面命令不加sud…
我python2.7, 做吴恩达深度学习第2课第2周编程作业 Optimization Methods 时有2个坑: 第一坑 需将辅助文件 opt_utils.py 的 nitialize_parameters(layer_dims) 函数中的 2 改成 2.0 , 保存后再重启jupyter notebook. 第二坑 需将辅助文件 opt_utils.py 的 plot_decision_boundary(model, X, y) 函数中的 c=y 改成 c=y[0], 保存后再重启jupy…
SVMs are considered by many to be the most powerful 'black box' learning algorithm, and by posing构建 a cleverly-chosen optimization objective优化目标, one of the most widely used learning algorithms today. 第一节 向量的内积(SVM的基本数学知识) Support Vector Machines 支持向…
Machine Learning – Coursera Octave for Microsoft Windows GNU Octave官网 GNU Octave帮助文档 (有900页的pdf版本) Octave 4.0.0 安装 win7(文库) Octave学习笔记(文库) octave入门(文库) WIN7 64位系统安装JDK并配置环境变量(总是显示没有安装Java) MathWorks This week we're covering linear regression with mul…