自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (3)
  • 收藏
  • 关注

原创 吴恩达编程练习:Programming Exercise 1: Linear Regression

1:with one variable在只有单一变量的情况下使用线性回归方法来预测下一次房价,根据题目要求要完成一下两个函数:J = computeCost(X, y, theta);其中X是输入的训练样本的矩阵,each row 代表的是一个训练样本的不同特征,each column代表的是针对该特征所有样本的该特征值。y是训练样本对应的标签(即结果)列向量。theta是在线性回归中假设...

2018-10-19 09:24:37 1092

原创 matlab 中repmat的用法

在matlab中repmat的用法有以下几种:repmat (A, m)repmat (A, m, n)repmat (A, m, n, p …)repmat (A, [m n])repmat (A, [m n p …])上述的用法的基本功能是形成mXn的块矩阵,其中每一个元素以举证A为样本来拷贝。举例说明A = [1 2 3;3 4 5;6 7 8]B = re...

2018-10-18 15:20:50 32016

原创 吴恩达机器学习笔记——梯度下降法

1:假设函数的参数更新要做到同时更新,即先将求得的参数放在统一的temp中,然后同时赋值给对应的参数w0,w1,w2,w3.....2:特征缩放和收敛速度问题倘若,特征向量中一些特征值相差太大,就会导致代价函数特征参数的函数曲线很密集,以至于需要多次迭代才能达到最小值。学习率:决定算法收敛的速度,较大的学习率,收敛速度较快,但是可能超过局部最小值,以至于代价函数不再收敛。而较小的学...

2018-10-18 10:58:25 239

原创 Tensorflow学习笔记——基本结构

tensorflow构建神经网络的基本框架1:导入模块,生成数据 import  常量定义 生成数据集2:前向传播 定义输入,输出x =      y_= W1 =     W2 =   a =       y =  3:反向传播:定义合适的损失函数,采取合适的反响传播方法loss = train_step =  4:生成绘画,训练step轮w...

2018-10-10 10:34:14 225

原创 数学建模之运输问题(产销平衡)

  问题描述:  某商品有m个产地,n个销地。各产地的产量分别是A1,A2......Am,各销地的需求量分别是B1,B2......Bn。若商品从i产地运输到j销地其单位运价为Cij,请问该如何调运才能使总运费最省?数学分析与建模:  我们引入变量:Xij代表从产地i运输到销地j的货物量,可以分析该问题的数学模型为:   约束条件为 具体案例分析与代码实现:  某公司...

2018-08-31 09:02:50 17705 2

原创 给定一个字符串,找出不含有重复字符的最长子串的长度。 示例: 给定 "abcabcbb" ,没有重复字符的最长子串是 "abc" ,那么长度就是3。 给定 "bbbbb" ,最长的子串就是 "b

Str = raw_input('plese input Str:')def qiu_chongfu(Str2):#定义判断字符串是否含有重复字符,如有返回0,没有返回1 biao = 0 for i in range(0,len(Str2)): for j in range(i+1,len(Str2)): if Str2[i]==St...

2018-07-21 11:04:25 1135

原创 python核心编程第二版 2.11

题目描述:文本输入,功能选择print '请输入相应功能的标号 1:求输入5个数之和。2:求输入5个数的平均值。3:将5个数大小排序。4:退出程序'a = int(raw_input())p = Truetotal = 0total1 = 0average = 0while p: if a == 1: #求和的功能代码 for i in rang...

2018-07-16 11:25:16 140

原创 python核心编程第二版 2.10题目

题目描述:键入合适的数字,否则等到直到合适数字为止p = Truea = int(raw_input('please input a number between [0.100]:'))while p: if a>0 and a<100: print 'good' p = False else: a = int(raw...

2018-07-16 10:11:55 149

原创 python核心编程第二版 2.9题目

题目描述;键入5个数,求其平均值。total = 0for i in range(0,5): a =float(raw_input('please input number %d:' %(i+1))) total = total + aprint 'the average is %f' %(total/5)

2018-07-16 09:40:48 111

原创 python核心编程第二版 2.8题

题目描述:输入5个数字求其和答total = 0for i in range(5)    total = total + int (raw_input('please input 5 numbers'))print total

2018-07-15 18:13:25 129

原创 Anconda2 里Spder突然打不开解决方法

将桌面下的c:\用户\Adminstrator\spyder 删除,然后从G:\Anconda2\Scripts中启动即可。

2018-07-14 16:06:13 591

c和指针c和指针c和指针c和指针c和指针c和指针

c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针c和指针

2019-04-29

吴恩达机器学习编程题即部分答案

Programming Exercise 1: Linear Regression Machine Learning Introduction In this exercise, you will implement linear regression and get to see it work on data. Before starting on this programming exercise, we strongly recom- mend watching the video lectures and completing the review questions for the associated topics. To get started with the exercise, you will need to download the starter code and unzip its contents to the directory where you wish to complete the exercise. If needed, use the cd command in Octave/MATLAB to change to this directory before starting this exercise. You can also find instructions for installing Octave/MATLAB in the “En- vironment Setup Instructions” of the course website. Files included in this exercise ex1.m - Octave/MATLAB script that steps you through the exercise ex1 multi.m - Octave/MATLAB script for the later parts of the exercise ex1data1.txt - Dataset for linear regression with one variable ex1data2.txt - Dataset for linear regression with multiple variables submit.m - Submission script that sends your solutions to our servers [?] warmUpExercise.m - Simple example function in Octave/MATLAB [?] plotData.m - Function to display the dataset [?] computeCost.m - Function to compute the cost of linear regression [?] gradientDescent.m - Function to run gradient descent [†] computeCostMulti.m - Cost function for multiple variables [†] gradientDescentMulti.m - Gradient descent for multiple variables [†] featureNormalize.m - Function to normalize features [†] normalEqn.m - Function to compute the normal equations ? indicates files you will need to complete † indicates optional exercises

2018-10-19

2018研究生数学建模比赛E题

2018年中国研究生数学建模竞赛E题 多无人机对组网雷达的协同干扰 组网雷达系统是应用两部或两部以上空间位置互相分离而覆盖范围互相重叠的雷达的观测或判断来实施搜索、跟踪和识别目标的系统,综合应用了多种抗干扰措施,具有较强的抗干扰能力,因而在军事中得到了广泛应用。如何对组网雷达实施行之有效的干扰,是当今电子对抗界面临的一个重大问题。

2018-09-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除