自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

han_hhh的博客

fighting

  • 博客(20)
  • 收藏
  • 关注

原创 Week 8 测验:Principal Component Analysis【Maching Learning】

4.第 4 个问题Which of the following statements are true? Check all that apply.A 、Given only and Ureduce, there is no way to reconstruct any reasonable approximation to 不正确B、PCA is susceptible to l...

2020-04-30 23:46:37 388 2

原创 Tensorflow学习笔记(一)

学习网址:https://tf.wiki/zh/basic/basic.html考虑一个实际问题,某城市在 2013 年 - 2017 年的房价如下表所示: 年份 2013 2014 2015 2016 2017 房价 12000...

2020-04-30 00:02:42 482

原创 Numpy包

一些属性:Numpy数组在创建时有固定大小数组中的所有元素都必须具有相同的数据类型numpy函数:ndarray.ndim:数组的维数ndarray.shape数组的形状,一个整数元组,指的是每一维度的size,n行m列就对应n*m,(n,m),形状元组的size就是数组的维度ndarray.size数组的元素个数,和shape元组中n*m相等ndarray....

2020-04-29 23:55:51 371

原创 Programming Exercise 6: Support Vector Machines

1.2.1 Gaussian Kernel高斯核求解公式sim=exp(-(x1-x2)'*(x1-x2)/2/sigma/sigma)

2020-04-23 11:02:59 335

原创 安装TensorFlow踩的坑

问题:ERROR: Cannot uninstall 'distlib'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.解决方案:pip insta...

2020-04-22 23:51:48 147

原创 用pip安装包时提示超时错误WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)

在anaconda中用pip安装包时提示超时错误WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', p...

2020-04-22 21:54:24 6788

原创 奥运排序问题【浙江大学复试机试题】

题目描述按要求,给国家进行排名。输入描述:有多组数据。第一行给出国家数N,要求排名的国家数M,国家号从0到N-1。第二行开始的N行给定国家或地区的奥运金牌数,奖牌数,人口数(百万)。接下来一行给出M个国家号。输出描述:排序有4种方式: 金牌总数 奖牌总数 金牌人口比例 奖牌人口比例 对每个国家给出最佳排名排名方式 和 最终排名格式为: 排名:排名方式如果有相同的...

2020-04-16 22:55:44 263

原创 坠落的蚂蚁【北京大学复试上机题】

1、对蚂蚁位置进行排序2、找到原来静止的蚂蚁A3、统计A左边向右走的蚂蚁数l,和右边向左走的蚂蚁数r4、如果l=r,两边的蚂蚁相互抵消,最终蚂蚁A静止,掉不下去5、如果l>r,左边r个蚂蚁和右边r个抵消,(从中间一对一对的抵消)最后左边第 l-r 个蚂蚁把速度传给了A,下标为l-r-1(从0开始)A向右走,直到掉下去6、如果l<r,左边l个蚂蚁和右边l个抵消,(从...

2020-04-16 20:17:12 409 2

原创 Programming Exercise 5: Regularized Linear Regression and Bias v.s. Variance

1.2 Regularized linear regression cost function1.3 Regularized linear regression gradient %刚开始没看到传进来的参数本身就已经给X加了一列了J=1/2/m*(X*theta-y)'*(X*theta-y)+lambda/2/m*theta(2:end)'*theta(2:end);grad=...

2020-04-14 18:46:21 327

原创 Week 6 测验:Advice for Applying Machine Learning【Maching Learning】

1You train a learning algorithm, and find that it has unacceptably high error on the test set. You plot the learning curve, and obtain the figure below. Is the algorithm suffering from high bias, hi...

2020-04-14 16:23:29 1200

原创 Week 5 编程作业

1.3 Feedforward and cost function 1、前向传播,从输入层到隐藏层,再到输出层,一步步计算,得出h2、输入该函数的y是一个5000*1的矩阵,需要把他变成5000*10的矩阵,如下3、利用代价函数公式计算J%nnCostFunction.m%compute hX=[ones(m,1),X];a1=X;z2=a1*Theta1'...

2020-04-13 23:18:09 159

原创 日期累加【北京理工大学复试机试题】

题目描述设计一个程序能计算一个日期加上若干天后是什么日期。输入描述:输入第一行表示样例个数m,接下来m行每行四个整数分别表示年月日和累加的天数。输出描述:输出m行,每行按yyyy-mm-dd的个数输出。示例1输入复制12008 2 3 100输出复制2008-05-13思路:输入year month day delay1、将月日...

2020-04-09 12:20:43 149

原创 Hello World for U 【浙江大学复试机试题】

题目描述Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: hd e l l r lowo That is, the characters must...

2020-04-07 13:15:35 398

原创 Week 4 编程作业

lrCostFunction.m和ex-2里的一样,这次还多了讲解n=size(X,2);h=sigmoid(X*theta);J=-1/m*(y'*log(h)+(1-y)'*log(1-h))+lambda/2/m*theta(2:n)'*theta(2:n);grad=1/m*(X'*(h-y))+lambda/m*theta;grad(1)=1/m*(X(:,1)...

2020-04-05 15:49:30 119

原创 Week 4 测验: Neural Networks:Representation【Machine Learning】

正确答案:BDC选项的错误原因,刚开始觉得既然是多分类问题,到最后肯定会满足h(x)只有一个1其他都是0,但是他们实际上是没有关系的正确答案:A根据给的theta值写出来h(x)的表达式,代入00、01、10、11,算一下结果,看和那个选项一致3、You have the following neural network:You'd like to com...

2020-04-05 10:57:18 199

原创 Week3 编程作业

sigmoid.m公式:g=1./(1+exp(-z))要注意是./,因为参数是矩阵时要对每个元素求其sigmoidcostFunction.m发现自从把第一章的向量化想出来 后来就没那么难了h=sigmoid(X*theta);J=-1/m*(y'*log(h)+(1-y)'*log(1-h))grad=1/m*(X'*(h-y))predi...

2020-04-04 19:50:38 151

原创 Week 3 测验 Regularization【Maching learning】

正确答案:CA的错误原因:将正则化方法加入模型并不是每次都能取得好的效果,如果λλ取得太大的化就会导致欠拟合. 这样不论对traing set 还是 examples都不好正确答案:AD的错误原因:正则化和J(theta)收不收敛没关系...

2020-04-04 13:12:27 167

原创 abc【清华大学复试上机题】

题目描述设a、b、c均是0到9之间的数字,abc、bcc是两个三位数,且有:abc+bcc=532。求满足条件的所有a、b、c的值。输入描述:题目没有任何输入。输出描述:请输出所有满足题目条件的a、b、c的值。a、b、c之间用空格隔开。每个输出占一行。思路:abc+bcc=532abc=100*a+10*b+1*cbcc=100*b+11*c...

2020-04-03 23:47:28 402

原创 Week 3测验 Logistic Regression【Machine Learning】

正确答案:ACBD中h(x)是线性回归的正确答案:BC正确答案:AB

2020-04-03 23:11:07 300

原创 Week2 编程作业

单变量computeCost.mJ=(X*theta-y).^2;J=1/(2*m)*sum(J);直接按代价函数的公式敲代码gradientDescent.m需添加的代码 temp0=theta(1)-alpha/m*sum((X*theta-y).*X(:,1)); temp1=theta(2)-alpha/m*sum((X*theta-...

2020-04-03 21:49:20 202

空空如也

空空如也

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

TA关注的人

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