- 博客(20)
- 收藏
- 关注
原创 习题 关于sklearn(第十五周)
题目:1 创建分类数据集(要求:样本数≥1000,特性≥10)2 使用10重交叉验证拆分数据集3 训练算法: GaussianNB算法 SVC算法(C的可能值:[1e-02,1e-01,1e00,1e01,1e02],RBF内核) RandomForestClassifier算法(n估计值的可能值:[10,100,1000])4 评估交叉验证的性能: 准确性 F1-s...
2018-06-20 18:46:09
349
原创 习题 关于jupyter notebook(第十四周)
题目网址:http://nbviewer.jupyter.org/github/schmit/cme193-ipython-notebooks-lecture/blob/master/Exercises.ipynb题目:In [1]:%matplotlib inline import random import numpy as np import scipy as sp import pan...
2018-06-13 16:51:17
471
原创 习题 关于scipy(第十三周)
最小二乘法求x,并计算残差(用 scipy.optimize 中的 leastsq 函数)。代码:import numpy as np import scipy.linalg as sl m = 5 n = 3 A = np.matrix(np.random.random((m, n))) print('A = ') print(A) b = np.matrix(np.random.random...
2018-06-04 22:18:13
244
原创 习题 关于Matplotlib
代码:import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2, 100) y = (np.sin(x - 2) ** 2) * np.exp(-(x ** 2)) plt.plot(x, y) plt.xlabel('my x label') plt.ylabel('my y label') plt.titl...
2018-05-29 23:23:38
302
原创 习题 关于Numpy
代码:结果:代码:结果:(以下为500行1列的 b 的部分截图)(以下为500行1列的 x 的部分截图)代码:结果:代码:结果:代码:结果:n, p与矩阵最大奇异值之间的关系是:n固定时,矩阵最大奇异值随p的增大而增大;p固定时,矩阵最大奇异值随n的增大而增大。代码:结果:...
2018-05-21 11:25:02
329
原创 LeetCode 1. Two Sum(第九周Ⅱ)
题目:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same...
2018-05-06 11:53:14
90
原创 LeetCode 18. 4Sum(第九周)
题目:Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of ...
2018-05-01 17:51:33
93
原创 LeetCode 16. 3sum Closest(第八周Ⅱ)
题目:Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input wou...
2018-05-01 13:18:32
102
原创 LeetCode 11. Container With Most Water(第八周)
题目:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find t...
2018-04-29 23:41:58
87
原创 Chapter10课后习题 文件和异常(第五周Ⅱ)
10-1:10-2:10-3:10-4:10-6:10-7:10-8:10-9:10-10:10-11:10-12:10-13:
2018-04-08 23:32:08
200
原创 Chapter8课后习题 函数(第四周Ⅱ)
8-1:8-2:8-3:8-4:8-5:8-6:8-7:8-8:8-10:8-11:8-12:8-13:8-14:8-16:8-17:
2018-04-01 23:11:41
253
原创 Chapter2课后习题 变量和简单数据类型(第一周Ⅱ)
C22-1:2-2:2-3:2-4:2-5:2-6:2-7:2-8:2-9:2-10:2-11:
2018-03-11 23:46:15
190
原创 浏览Python主页(https://www.python.org/)的发现和收获∪目标(第一周)
发现和收获: 1.网页上介绍python是一门通俗易学的语言,无论是对学过编程的或是零基础的都十分友好;网页上还有针对这两类人写的教程,能跟着教程走或许是个不错的选择(虽然我还是会选择听老师讲哈哈)。 2.有趣的是网站上的社区还会举办线上会议和聚会,让学习者有更多的机会协作。这期间还能充分利用网站提供的参考资料,这样学估计能力提升挺快吧! 3.这个网站上有些网页是维基页面,允许用户...
2018-03-10 20:50:17
4581
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人